Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Linking libraries in CDT(Problems linking FlTk in CDT)
Linking libraries in CDT [message #494201] Thu, 29 October 2009 14:56 Go to next message
Justin  is currently offline Justin Friend
Messages: 3
Registered: October 2009
Junior Member
Hi all,

I am new to CDT, and would like to develop FlTk and OpenGL in CDT on a Windows machine.

I've written a very simple window class and I am recieving the follwing errors:

g++ -LC:\fltk-1.1.7\lib_CS559 -oFLTK_Window.exe main.o MyWindow.o
main.o: In function `main':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../main.cpp:14: undefined reference to `Fl_Window::show()'
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../main.cpp:17: undefined reference to `Fl::run()'
MyWindow.o: In function `ZN8MyWindowC2EiiPc':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
MyWindow.o: In function `ZN8MyWindowC1EiiPc':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
MyWindow.o: In function `ZN8MyWindowD2Ev':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:17: undefined reference to `Fl_Window::~Fl_Window()'
MyWindow.o: In function `ZN8MyWindowD1Ev':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:17: undefined reference to `Fl_Window::~Fl_Window()'
MyWindow.o: In function `ZN8MyWindowD0Ev':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:17: undefined reference to `Fl_Window::~Fl_Window()'
MyWindow.o: In function `ZN8MyWindowC2EiiPc':
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::draw()'
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::handle(int)'
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::resize(int, int, int, int)'
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::flush()'
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::show()'
C:/Users/ELOY06271/Eclipse Workspace/FLTK_Window/Debug/../MyWindow.cpp:13: undefined reference to `Fl_Window::hide()'
collect2: ld returned 1 exit status

Which is a bunch of undefined reference to various functions used by the constructor for a Window in FlTk. Correct me if I'm wrong, but this means there is an issue with linking the required libraries?

In project->properties->settings I go to the MinGW C++ Linker, click libraries and in the -L text area I have entered the area where the fltkdll and fltkdlld libraries are stored.

Any suggestions?
Re: Linking libraries in CDT [message #494554 is a reply to message #494201] Sat, 31 October 2009 11:32 Go to previous messageGo to next message
James Blackburn is currently offline James BlackburnFriend
Messages: 36
Registered: July 2009
Member
AFAICS this isn't a CDT issue..

You've specified a library search path (-L) but you haven't specified any libraries to link against...
Re: Linking libraries in CDT [message #494566 is a reply to message #494554] Sat, 31 October 2009 14:35 Go to previous messageGo to next message
Justin  is currently offline Justin Friend
Messages: 3
Registered: October 2009
Junior Member
Where exactly do I specify that? in the area right above with the
-l ? Or do I go somewhere else?
Re: Linking libraries in CDT [message #494679 is a reply to message #494566] Mon, 02 November 2009 07:51 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Justin wrote on Sat, 31 October 2009 10:35
Where exactly do I specify that? in the area right above with the
-l ?

Yes.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:CDT future plans releases
Next Topic:building external to eclipse
Goto Forum:
  


Current Time: Sat Oct 26 00:00:43 GMT 2024

Powered by FUDForum. Page generated in 0.02223 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top