|
From: Alfred P. R. <al...@ya...> - 2005-02-20 22:44:02
|
This is solved by doing a search in the library files for the text 'DeleteObject@4' as an example. Don't mind the link, as IE isn't smart enough to know that the above isn't an e-mail address. Once found, add it to the linker line. Searching on my implementation,: $ grep -ri 'DeleteObject@4' * <in dev-cpp/lib, BTW> Binary file libfltk.a matches Binary file libgdi32.a matches My take is that the actual entity referenced is in libgdi32.a and not libfltk.a, which you actually use in your link line below. I've had this problem numerous times, and am very thankful for the Unix-like capability that has finally been ported to Windows, as exampled by grep. The MS DOS command, BTW, is findstr, which is a poor subsitute for grep, IMHO. I'm working on an application right now with 9 modules that uses: #include <FL/Fl.H> #include <FL/Fl_Ask.H> #include <FL/Fl_Button.H> #include <FL/FL_Clock.H> #include <FL/Fl_Check_Button.H> #include <FL/Fl_Double_Window.H> #include <FL/Fl_Group.H> #include <FL/Fl_Image.H> #include <FL/Fl_Input.H> #include <FL/Fl_Light_Button.H> #include <FL/Fl_Progress.H> #include <FL/Fl_Round_Button.H> #include <FL/Fl_Text_Buffer.H> #include <FL/Fl_Text_Display.H> I've got to manually include in the Project Options-->Parameters-->Linker the following: ../Dev-Cpp/lib/libfltk.a ../Dev-Cpp/lib/libole32.a ../Dev-Cpp/lib/libuuid.a ../Dev-Cpp/lib/libwsock32.a Or I get reference errors. I have no clue as to why Dev-Cpp doesn't find them on it's own. Scott Brown <doo...@ya...> wrote: Hello, I am trying to compile an example program which uses FLTK, but I get the following error message: Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\MyProjects\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\MyProjects\Makefile.win" all g++.exe -c fltkTest.cpp -o fltkTest.o -I"C:/Dev-Cpp/include/c++/3.3.1" -I"C:/Dev-Cpp/include/c++/3.3.1/mingw32" -I"C:/Dev-Cpp/include/c++/3.3.1/backward" -I"C:/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include" -I"C:/Dev-Cpp/include/FL" -I"C:/Dev-Cpp/include" fltkTest.cpp:25:2: warning: no newline at end of file g++.exe fltkTest.o -o "FLTKProject2.exe" -L"C:/Dev-Cpp/lib" ../lib/libfltk.a ../lib/libfltk_forms.a ../lib/libfltk_gl.a ../lib/libfltk_images.a ../lib/libfltk.a(Fl.o)(.text+0x74a):Fl.cxx: undefined reference to `DeleteObject@4' <snip> Alfred P. Reaud |