Reputation: 4213
I have a gui window using fltk class that works fine when I compile it by itself. For doing that, I use - fltk-config --compile guiwindow.cpp
But I really want to use this in my project. So how can I do something like - g++ -o go file1.cpp file2.cpp etc guiwindow.cpp
so that I can use this guiwindow class with my other classes? Any help is appreciated.
Btw, whenever I try the g++ command above, I get tons of undefined reference errors.
Upvotes: 0
Views: 984
Reputation: 61
g++ fltk-config --cxxflags
file1.cpp file2.cpp fltk-config --ldflags
-o go
I have used this with ubuntu 8 to ubunt 12.10 and Mint 13 and Mint 14. Which are all Linux.
Files.cxx is used if the GUI Fluid is used.
Upvotes: 2
Reputation: 52337
fltk is a not great when it comes to linking it with other stuff. It brings its own c++ stdlib and other libraries. just avoid it.
Other than that you should give more information on what command you used for compiling and what was the compiler's output. In theory it is possible to build stuff with fltk using plain g++, I did it already but then I was not allowed to use pow() in my programs!
Upvotes: 0