Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Libraries tab misbehavior

Hi! I don't have a definite answer to your questions but I inlined some thoughts below:

On 2015-10-12 10:53 AM, Azab, Mohamed wrote:

Hi,

 

I am having a wrong behavior when using the C/C++ General > Paths and Symbols > Libraries tab.

If you either added a workspace path or an absolute path to a library file, it gets added as -l option under C/C++ Build > Settings > Tool Settings > C Linker > Libraries which causes the linker to fail as the -l flag should hold only the name of the library.


I usually use C Linker > Libraries for -lfoo and C Linker > Miscellaneous for /usr/lib/foo.so
This does the right thing AFAIK.

As a user, it was always odd and confusing to me that there are two ways of setting the libraries and includes for build: Through the C/C++ Build > Settings > C Linker and through C/C++ General > Paths and Symbols. I find that setting options on the tools (C/C++ Build) is more intuitive than per language (C/C++ General > Paths and Symbols) because it gives you a better idea of how it will affect the build commands.


Is there a reason why the “Libraries” tab allow the user to browse for the library? Shouldn’t we give just a text box (like on -l option case) to not to offer something that doesn’t work?

 

I agree, this is how it is in C Linker > Libraries and it works fine.

Another way to handle this would be to add two entries: The library name with the -l option, and the library path with the -L option. But I looked into the implementation and it seems that it is not straightforward to change it to add two entries instead of one though.


I think another option would be to remove this UI. I'm not sure how useful it is anymore. It used to be useful in case you were not using the "managed build" and you wanted to add some include paths to pass to the indexer. But now there is also "C/C++ General > Preprocessor Include Paths, Marcos etc" for that.

Marc-Andre

Thanks,

 

Mohamed Azab

Software Development Engineer

Mentor Graphics

ESD | CodeBench

 



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top