hi i am using eclipse ide for c++ and i have file.a and i want to do linkage to this file how i do this?
A:
I assume you let eclipse manage your Makefile. Go to Project -> Properties -> C/C++ Build -> Settings ->Tool settings.
At the top select [All configurations], to make sure that the library linked in all your builds.
In the list select Libraries under the GCC C++ Linker. Add your library there, if your library filename is like lib.a then you need to add here.
Under Library search path you need to add the containing directory of your library.
Fabian
2010-09-02 17:46:10
thanks but i add this things to the compiler he add the flags-L~/ and -lfiles.a but still it doesn’t working
ron
2010-09-02 18:06:37
I am not sure if eclipse expands ~/ Try to add the absolute path instead. If you are using -lfiles.a, then make sure that your library is called libfiles.a.If that doesn't help can you post the output that eclipse gives when compiling?
Fabian
2010-09-03 06:22:50
thank you thank you thank you after i add lib to the name it worked
ron
2010-09-03 07:30:53