GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ 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 18-Apr-2005, 09:47
Gamer_2k4's Avatar
Gamer_2k4 Gamer_2k4 is offline
Member
 
Join Date: Apr 2005
Location: Wisconsin
Posts: 117
Gamer_2k4 will become famous soon enough

Linker Errors with Dev-C++ 5


I am trying to compile a project with Dev-C++ 4.9.9.1, and it compiles ok. When it trys to link, however, I get a huge amount of errors:

[Linker error] undefined reference to `__w32_sharedptr_initialize'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'

and so on...
What is causing this and how can I fix it?
  #2  
Old 18-Apr-2005, 12:08
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,218
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold
Quote:
Originally Posted by Gamer_2k4
I am trying to compile a project with Dev-C++ 4.9.9.1, and it compiles ok. When it trys to link, however, I get a huge amount of errors:

[Linker error] undefined reference to `__w32_sharedptr_initialize'
[Linker error] undefined reference to `_Unwind_SjLj_Register'

and so on...
What is causing this and how can I fix it?


When I see messages about "unwind" stuff, I think maybe it's using a C++ compiler/linker on a C program (C source language would (probably) be ok with a C++ compiler, but they are linked differently due to function name mangling features of c++).

Here's a plan of attack:

Create a C++ console project. Something simple (hello world). Make sure the source file is main.cpp (or something.cpp). Compile, link, and execute.

Create a C console project. Something simple (hello world). Make sure tha source file is main.c (or something.c). Compile, link, and execute.

If you can do both of these steps, then look at your project: is it C or C++?
Are source files named .c or .cpp?
Make them compatible with the project type.

If nothing here helps, then tell us a little more about your project: console or GUI? C or C++? File names? Header names? What headers are you #include' ing? Etc. If it's not really huge, post the code.

Regards,

Dave
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

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
How can we trap errors in Constructors (C++) Poolan C++ Forum 6 19-Nov-2004 08:41
help to debug complier errors nkhambal C Programming Language 3 04-Oct-2004 09:26
Wierd errors (again) crystalattice C++ Forum 3 15-Aug-2004 21:02
Can't figure out errors crystalattice C++ Forum 3 17-Jul-2004 08:58
Can somebody look at this and point out any errors to me soulfly C Programming Language 7 31-Mar-2004 10:45

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

All times are GMT -6. The time now is 02:07.


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