Problem in linking a static library (Windows) [message #694780] |
Sat, 09 July 2011 17:05 |
jouni.karhima Messages: 2 Registered: July 2011 |
Junior Member |
|
|
Hello all,
I'm a new CDT user and trying to set up a simple example of a static library and an executable that uses it. This proved to be a lot more complicated task than I expected, but after spending a good few hours working on it I have got close to my goal. At the very doorstep I'm facing still one more problem and this seems to be a little bit too much for me. So close and so far.
First I was able to build my simple library with one class. Then I created the executable project and linked my library to it using the steps i found in this CDT Shared library article (janmagnet.wordpress.com/2007/09/30/eclipse-cdt-and-shared-libraries/). A few more steps on top of that I had my basics ready, but then I still had some problems to solve.
It seems that in Windows environment the paths in the makefile starting with C: are problematic as : is a control character. This is referred at least in this current issues page (projects.coin-or.org/BuildTools/wiki/current-issues). I don't know how to change the make version within CDT and so I chose another path by disabling the automatic makefile generation and fixed the paths myself. After this phase I was successful in building the executable, where the library was linked, but not yet used.
The final step I need is to actually use the library. An attempt to do this produces the final problem I haven't been able to solve. When I build my program (Test.cpp) I get the following error
src/Test.d:1: *** multiple target patterns. Stop.
Now this is actually the same problem I solved before. It is caused by library paths that start with C: and the : character is the problem. But this time the problem is not located anymore in the makefile, but instead in Test.d file, which I understand is some temporary file created at some compilation stage. Now I have no idea how to fix that. I don't understand the compilation process well enough to know if I'm able to affect on how the paths are presented in this file. So I'm stuck.
I see two alternatives to proceed:
1) I follow the instructions of my second link and fix the make version. This would propably be the better solution, but is it possible for me to change the CDT build-in make version?
2) I find yet another work-around that also fixes the paths in the .d file. But I don't know where to look for that or is it even possible?
Any responses are welcome.
[Updated on: Sat, 09 July 2011 17:05] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02501 seconds