Can't link libs - help please! [message #1061996] |
Wed, 05 June 2013 10:16 |
Peter Ritter Messages: 2 Registered: March 2013 |
Junior Member |
|
|
Hello
I just recently moved to Eclipse CDT after 15 years of MS Visual Studio, and I have to say that so far - I love it. It took a little while to get used to and configure the IDE, but overall Eclipse is great - especially the multithreaded compiling which is just insanely fast on my 6 core pc.
However, I have run into a problem which is driving me mad. I am currently porting a charting library which uses the GD graphics library. I now realize that I spent the last few month working on my own code and hadn't linked to any external libs at all. So, configuring the link directories and lib files was something I hadn't done so far. And I can't get it to work for the life of me. There is probably a really simple solution for this, but I don't see it. I need to link to two lib files:
1) libTSAPI.a
2) libgd.so
in their respective directories:
1)/home/peter/_PR_DEV_/DEV_PROJECTS/EclipseProjects/TSAPI/Debug
2)/usr/lib64
I have set this up using the Eclipse IDE in
Project-> Properties-> GCC C++ Linker -> Libraries
I have dropped the 'lib' prefix and the compiler/linker now give me the following message:
Building target: TS_CHART
Invoking: GCC C++ Linker
g++ -L/usr/lib64 -L/home/peter/_PR_DEV_/DEV_PROJECTS/EclipseProjects/TSAPI/Debug -o "TS_CHART" ./Testing/MainDriver.o ./Testing/TSC_TESTING.o ./Testing/TSC_TEST_ChartBasic.o ./Testing/TSC_TEST_ChartMaker.o ./Testing/TSC_TEST_HighLevel.o ./Source/TSCChartBorder.o ./Source/TSCChartMaker.o ./Source/TSCColor.o ./Source/TSCDataSeries.o ./Source/TSCIcons.o ./Source/TSCImage.o ./Source/TSCPane.o ./Source/TSCPaneHeader.o ./Source/TSCPlotArea.o ./Source/TSCPlots.o ./Source/TSCPositionChart.o ./Source/TSCPriceAxis.o ./Source/TSCPriceLegend.o ./Source/TSCPropertyMap.o ./Source/TSCTimeLegend.o ./Source/TSCWrapper.o -lgd.so -lTSAPI.a
/usr/bin/ld: cannot find -lgd.so
/usr/bin/ld: cannot find -lTSAPI.a
collect2: error: ld returned 1 exit status
make: *** [TS_CHART] Error 1
So, it cannot find either library! I have checked both directories give with -L in a terminal and I'm sure they exist and that the lib files are in them. Why does the linker not find them? I spent most of my day on this yesterday, and I feel I learned quite a bit about how to get around the Eclipse IDE, but was not able to build my project. I would really appreciate if somebody could give me a hint on what I'm doing wrong.
Best Regards, Peter Ritter
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03591 seconds