User forums > Help
Linker problem after importing DevCpp project
ijese:
libFOX.a is a same fox-toolkit library file which I use for several projects.
15mins ago I have built a Fox "hello-world" with CB using the same file (I copied it from the project which doesn't link). I even tried the variations with nested directories and such and it still worked fine.
Right now I'm trying to create the CB project from scratch (without dev-cpp import). It might work and if not I still might get some clue.
thomas:
--- Quote ---
--- Quote ---It tells you exactly what's wrong...
--- End quote ---
If you can see what's wrong please explain.
--- End quote ---
Just read. The file that the linker tries to open is not good.
--- Quote ---libFOX.a is a same fox-toolkit library file which I use for several projects.
--- End quote ---
No, you think it is, but it is obviously not- the linker would not complain if it were. Check your linker paths and remove everything you don't need.
--- Quote ---15mins ago I have built a Fox "hello-world" with CB using the same file (I copied it from the project which doesn't link). I even tried the variations with nested directories and such and it still worked fine.
--- End quote ---
That's just the cause that often creates such a mess. Never copy around headers or libraries unless there is a good reason to do so, and never work with several versions of the same file at the same time.
One should ideally keep exactly one version of everything in one place. Then there is no question about whether the right file is used.
ijese:
--- Quote ---No, you think it is, but it is obviously not- the linker would not complain if it were. Check your linker paths and remove everything you don't need.
--- End quote ---
The from-scratch approach didn't work either, so I'm doing this clean-up right now. Of course it probably is my fault but I (maybe wrongly) expected that something that worked in dev-cpp would work after import in CB without much trouble.
Currently I'm getting different errors: a lot of unresolved _imp_* which do exists in library (i checked with nm) but without "_imp_" mangled in. I want to link everything statically in one executable file but it seems ld expects libraries which will be used dinamicaly or something like that, I'm not exactly an c++ expert so I'm barely swimming.
--- Quote ---That's just the cause that often creates such a mess. Never copy around headers or libraries unless there is a good reason to do so, and never work with several versions of the same file at the same time. One should ideally keep exactly one version of everything in one place. Then there is no question about whether the right file is used.
--- End quote ---
The problem arises when I want to fix a bug in a project from 3 years ago. In my experience the safest thing is to store everything including libs in cvs.
Navigation
[0] Message Index
[*] Previous page
Go to full version