I'm building a single file console program.
To get some text from data.txt file I made an object file data.o.
Works fine if I do not include librarys from a path outside the project path.
g++ -o bin/Debug/kannweg data.o obj/Debug/main.o
When I include another library and do not close my project code::blocks generates the following :
g++ -o bin/Debug/kannweg obj/Debug/lib/cpp/JdDebug.o data.o obj/Debug/main.o
Then I close the project and open it again and rebuild:
g++ -o bin/Debug/kannweg obj/Debug/lib/cpp/JdDebug.o cpp/kannweg/data.o obj/Debug/cpp/kannweg/main.o
This leads to the following error:
g++: error: cpp/kannweg/data.o: Datei oder Verzeichnis nicht gefunden
Tried to add the projects path to the search directories, but that made no difference.
The real program has a great number of external includes, so the workaround of my second test is not applicable.
Any Ideas for a fix or workaround?