Cannot link to C app

View: New views
6 Messages — Rating Filter:   Alert me  

Cannot link to C app

by Mattias Holm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have been having issues with linking ODE on Snow Leopard. This
happens with at least trunk and the latest 0.11.1 source tarball.

gcc -m64 test.c -I./include -L./lib -lode -DdSINGLE

Results in about a kilometer of linking errors like:

  "___cxa_pure_virtual", referenced from:
      vtable for dxGeomin libode.a(collision_kernel.o)
      vtable for dxSpacein libode.a(collision_space.o)
      vtable for dxSpacein libode.a(collision_space.o)
      vtable for dxSpacein libode.a(collision_space.o)
ld: symbol(s) not found


g++ -m64 test.c -I./include -L./lib -lode -DdSINGLE

However works perfectly fine. I known that I have been able to use
0.10 on Snow Leopard, linking to C-code.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Cannot link to C app

by Klaus Backert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 17 Oct 2009, at 14:01, Mattias Holm wrote:

>
> I have been having issues with linking ODE on Snow Leopard. This
> happens with at least trunk and the latest 0.11.1 source tarball.
>
> gcc -m64 test.c -I./include -L./lib -lode -DdSINGLE
>
> Results in about a kilometer of linking errors like:
>
>  "___cxa_pure_virtual", referenced from:
>      vtable for dxGeomin libode.a(collision_kernel.o)
>      vtable for dxSpacein libode.a(collision_space.o)
>      vtable for dxSpacein libode.a(collision_space.o)
>      vtable for dxSpacein libode.a(collision_space.o)
> ld: symbol(s) not found
>
>
> g++ -m64 test.c -I./include -L./lib -lode -DdSINGLE
>
> However works perfectly fine. I known that I have been able to use
> 0.10 on Snow Leopard, linking to C-code.

To be sure I have checked my own compilation (configure, make, make  
install). All over the place g++ is used, and nowhere gcc. As far as I  
can tell, this has never been different. Have you ever in the past  
checked your output of make?

Klaus


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Cannot link to C app

by Klaus Backert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 17 Oct 2009, at 14:35, Klaus Backert wrote:
>
> To be sure I have checked my own compilation (configure, make, make
> install). All over the place g++ is used, and nowhere gcc. As far as I
> can tell, this has never been different. Have you ever in the past
> checked your output of make?

Sorry, as I see now, my answer has not been to the point :-( Please  
forget it.

Klaus


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Cannot link to C app

by Mattias Holm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I should have said I am having problem LINKING TO ode...

Sorry.

On Oct 17, 2:50 pm, Klaus Backert <Klaus.Back...@...> wrote:

> On 17 Oct 2009, at 14:35, Klaus Backert wrote:
>
>
>
> > To be sure I have checked my own compilation (configure, make, make
> > install). All over the place g++ is used, and nowhere gcc. As far as I
> > can tell, this has never been different. Have you ever in the past
> > checked your output of make?
>
> Sorry, as I see now, my answer has not been to the point :-( Please  
> forget it.
>
> Klaus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Cannot link to C app

by Mattias Holm-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


It only happens if I build libode as a static library. Dylib / so
works fine...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Cannot link to C app

by Daniel K. O.-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


It appears that libtool isn't adding libstdc++ as a dependency lib to
libode.la. Add -lstdc++ to your linker flags for a workaround.

--
Daniel K. O.
"The only way to succeed is to build success yourself"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-users@...
To unsubscribe from this group, send email to ode-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---