GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 15-May-2006, 03:54
unpep unpep is offline
New Member
 
Join Date: May 2006
Posts: 3
unpep is on a distinguished road

linker error


I'm trying to run fltk "Hello World" program in Dev-C++ and when i compile it, the following error comes. The compile log is

Code:
Compiler: Default compiler Executing g++.exe... g++.exe "D:\IAM\IAM-mysoft\Iam-ppa\test1.cxx" -o "D:\IAM\IAM-mysoft\Iam-ppa\test1.exe" -g3 -nostdlib -mwindows -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3 -nostdlib -mwindows C:\Dev-Cpp\Bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: warning: cannot find entry symbol _WinMainCRTStartup; defaulting to 00401000 C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x24): In function `main': D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:5: undefined reference to `_alloca' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x2b):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:5: undefined reference to `__gxx_personality_sj0' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x50):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:5: undefined reference to `_Unwind_SjLj_Register' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x55):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:5: undefined reference to `__main' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x68):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:6: undefined reference to `operator new(unsigned int)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x95):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:6: undefined reference to `Fl_Window::Fl_Window(int, int, char const*)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0xa8):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:6: undefined reference to `operator delete(void*)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0xc0):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:6: undefined reference to `_Unwind_SjLj_Resume' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0xd9):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:7: undefined reference to `operator new(unsigned int)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x13e):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:7: undefined reference to `operator delete(void*)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x156):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:7: undefined reference to `_Unwind_SjLj_Resume' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x1a1):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:11: undefined reference to `fl_define_FL_SHADOW_LABEL()' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x1bb):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:12: undefined reference to `Fl_Group::end()' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x1d4):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:13: undefined reference to `Fl_Window::show(int, char**)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x1d9):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:14: undefined reference to `Fl::run()' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text+0x1e7):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:14: undefined reference to `_Unwind_SjLj_Unregister' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text$_ZN6Fl_BoxC1EiiiiPKc[Fl_Box::Fl_Box(int, int, int, int, char const*)]+0x30):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:5: undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const*)' C:\DOCUME~1\PWINT~1.RRC\LOCALS~1\Temp/ccMnbaaa.o(.text$_ZN6Fl_BoxC1EiiiiPKc[Fl_Box::Fl_Box(int, int, int, int, char const*)]+0x39):D:/IAM/IAM-mysoft/Iam-ppa/test1.cxx:5: undefined reference to `vtable for Fl_Box' collect2: ld returned 1 exit status Execution terminated

What further setting should i need to do?Please help me. Thanks.
Last edited by LuciWiz : 15-May-2006 at 04:20. Reason: Added code tags (for better formatting)
  #2  
Old 16-May-2006, 05:06
bluekid bluekid is offline
Junior Member
 
Join Date: Apr 2006
Posts: 42
bluekid will become famous soon enough

Re: linker error


Use CodeBlocks IDE
  #3  
Old 16-May-2006, 06:55
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,109
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough

Re: linker error


Welcome to GIDForums™ unpep. There are a number of people that wander through here that use Dev-C++. Post your code for your test1 program and perhaps something will jump out at us.

The other thought is that you are not properly linking to the fltk library (linker settings in your IDE) for some of the later errors.

Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #4  
Old 18-Jun-2006, 07:41
squirrelboy squirrelboy is offline
New Member
 
Join Date: Jun 2006
Posts: 1
squirrelboy is on a distinguished road
Arrow

Re: linker error


You can set up which libraries to include in DevC++ using Project->Project Options and going to the 'Parameters' tab.
Add the appropriate library using the same format as those already present in the box.

Also check to make sure DevC++ points at the correct 'includes' and 'libraries' directories under the 'Directories' tab in the same dialogue box.
  #5  
Old 15-Apr-2007, 04:03
n2liquid n2liquid is offline
New Member
 
Join Date: Apr 2007
Posts: 2
n2liquid is on a distinguished road

Re: linker error


Download the DevPak, which have a nicely ready-to-use template:
devpaks.org
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] GUI programming with FLTK dsmith FLTK Forum 10 03-Oct-2005 16:41
Winsock error when compiling FLTK 2.0 Projects mauriciorossi FLTK Forum 3 16-Aug-2005 11:18
Help with syntax errors PeteGallo C Programming Language 7 08-Aug-2005 21:30
What is "Ambigious symbol" ??*( a compilation error) small_ticket C++ Forum 2 07-Jan-2005 22:10
Can enum have same name as class? crystalattice C++ Forum 3 08-Dec-2004 17:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:17.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.