开发者

How to compile fltk file with other files?

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 gui开发者_如何学编程window.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.


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.


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜