public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Linker Problem Help Required
@ 2006-08-18 11:03 Manish Baphna
  2006-08-18 14:25 ` Tim Prince
  0 siblings, 1 reply; 3+ messages in thread
From: Manish Baphna @ 2006-08-18 11:03 UTC (permalink / raw)
  To: gcc-help

Hi , 

I am Manish, a SW engr from INDIA .
I found some threads about linking error on
gcc.gnu.org while searching for some trouble I am
facing . I couldn't  see the exact solution so thought
of mailing to this maillist. I would appreciate if you
can spare some time in replying to me.
I am trying to build a DLL using

bash>> g++ -g -shared -o Me.dll <Various ".o"s/ ".a"s>

But when use that DLL , my program crashes because
some symbols are not resoved. 
bash> ld Me.dll
ld: warning: cannot find entry symbol _start; not
setting start address
Me.dll: undefined reference to `__pure_virtual'
Me.dll: undefined reference to `endl(ostream &)'
Me.dll: undefined reference to `__rtti_user'
Me.dll: undefined reference to
`ostream::operator<<(ostream &(*)(ostream &))'
Me.dll: undefined reference to `__rtti_si'
Me.dll: undefined reference to `__rethrow'
Me.dll: undefined reference to
`ostream::operator<<(char const *)'
Me.dll: undefined reference to `terminate(void)'
Me.dll: undefined reference to
`ostream::operator<<(int)'
Me.dll: undefined reference to `__builtin_delete'
Me.dll: undefined reference to `__builtin_new'
Me.dll: undefined reference to `cout'

These things started popping up when I moved to
gcc323. Initially I was using gcc2.95 and everything
was fine. I have already built all dependent
archive/object files using gcc3.2.3.

Do you think you can help me here..? 
It would be of great value.

Thanx in Advance for your time

Best Regards,
Manish


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Linker Problem Help Required
  2006-08-18 11:03 Linker Problem Help Required Manish Baphna
@ 2006-08-18 14:25 ` Tim Prince
  2006-08-19 11:23   ` Manish Baphna
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Prince @ 2006-08-18 14:25 UTC (permalink / raw)
  To: Manish Baphna; +Cc: gcc-help

Manish Baphna wrote:
> Hi , 
> 
> I am Manish, a SW engr from INDIA .
> I found some threads about linking error on
> gcc.gnu.org while searching for some trouble I am
> facing . I couldn't  see the exact solution so thought
> of mailing to this maillist. I would appreciate if you
> can spare some time in replying to me.
> I am trying to build a DLL using
> 
> bash>> g++ -g -shared -o Me.dll <Various ".o"s/ ".a"s>
> 
> But when use that DLL , my program crashes because
> some symbols are not resoved. 
> bash> ld Me.dll
> ld: warning: cannot find entry symbol _start; not
> setting start address
> Me.dll: undefined reference to `__pure_virtual'
> Me.dll: undefined reference to `endl(ostream &)'
> Me.dll: undefined reference to `__rtti_user'
> Me.dll: undefined reference to
> `ostream::operator<<(ostream &(*)(ostream &))'
> Me.dll: undefined reference to `__rtti_si'
> Me.dll: undefined reference to `__rethrow'
> Me.dll: undefined reference to
> `ostream::operator<<(char const *)'
> Me.dll: undefined reference to `terminate(void)'
> Me.dll: undefined reference to
> `ostream::operator<<(int)'
> Me.dll: undefined reference to `__builtin_delete'
> Me.dll: undefined reference to `__builtin_new'
> Me.dll: undefined reference to `cout'
> 
> These things started popping up when I moved to
> gcc323. Initially I was using gcc2.95 and everything
> was fine. I have already built all dependent
> archive/object files using gcc3.2.3.
> 

Check that you are picking up the shared libraries at run time which 
correspond with the gcc version you compiled with.  There is no 
compatibility between shared libraries of different major gcc versions, 
even though they may have the same name.  If you have more than one 
version installed, you would need to make certain that the correct one 
comes first on the library search path.  gcc has its own search path for 
compiling, but that path would not be "remembered" at run time.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Linker Problem Help Required
  2006-08-18 14:25 ` Tim Prince
@ 2006-08-19 11:23   ` Manish Baphna
  0 siblings, 0 replies; 3+ messages in thread
From: Manish Baphna @ 2006-08-19 11:23 UTC (permalink / raw)
  To: gcc-help

Hi All , 

I realized that out of few objects/archives I was
using to build DLL , one was faulty wrt gcc version.

I rebuilt that with gcc323 and it clicked :)

Warm Regards
Manish


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-18 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-18 11:03 Linker Problem Help Required Manish Baphna
2006-08-18 14:25 ` Tim Prince
2006-08-19 11:23   ` Manish Baphna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).