I have a list of files (cpp, h, and also child-folders inside with cpp/h too).
I’m not sure how to build it correctly because it doesn’t have any makefile or smth like that (pure c++-files). So I decided to “catch” the right gcc arguments to build it.
g++ *.cpp `wx-config --libs` `wx-config --cxxflags` -lGL -lglut -lfkr-skeletal2d
Now I have that line. Here is the list of files:
$ ls -p
AnimationEditor/ Core-Code/ GLRender.cpp GLSprite.cpp Icons/ LGPLv3.txt MainWindow.h PlayBar.h PopUp.h TimeLine.h
BoneEditor/ daten/ GLRender.h GLSprite.h LGPLv3_de.txt MainWindow.cpp PlayBar.cpp PopUp.cpp TimeLine.cpp wxWidgets_Addons/
There is files in directory Core-Code:
AnimationManager.cpp AnimationManager.h SkeletalManager.cpp SkeletalManager.h TextureManager.cpp TextureManager.h
When I use that gcc-line I get a lot of linker errors:
undefined reference to `CSkeletalManager::***
undefined reference to `CAnimationManager::***
Maybe, I have to specify somehow the files from Core-Code. I can’t understand the problem.
The best thing to do would be to put in a little effort and actually create a set of Makefiles; a top-level one, and child Makefiles for the subdirectories. But if you want to use your same approach of just creating a command line, start by replacing your ‘*.cpp’ with
find . -name '*.cpp'so that it includes all the*.cppfiles. I think after that you’ll have problems finding*.hppfiles, so you’ll need to add some-Ioptions to tellg++where to look for the headers.So something like