Horde3D

Next-Generation Graphics Engine
It is currently 13.05.2024, 17:52

All times are UTC + 1 hour




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: 09.02.2010, 18:48 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
kornerr wrote:
What's the exact circular reference Horde3D has?
It doesn't - note that I said "out-of-order or circular". The issue is that you must link to Horde first, QT next and OpenGL last, because they depend on each other in that order.

As was alluded to earlier, MSVC (among others) uses a 2-pass linker, so it can find all missing symbols before resolving them, and thus it doesn't care which order the libraries are passed in.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 09.02.2010, 23:12 
Offline

Joined: 15.06.2008, 11:21
Posts: 166
Location: Germany
Oh, I doubt that is the problem. With shared libraries, the linux linker of course can resolve circular references - it just does not *by default* with static libraries.

"The issue is that you must link to Horde first, QT next and OpenGL last" - as I understood it, it was the exact opposite. See how kornerr linked to Horde3D first, and Horde3D itself links to OpenGL first.

EDIT: It probably rather looks like the dynamic linker drops the reference to libGL.so from the Horde3D lib if there was a reference to it earlier in the executable which causes the GL functions to be redirected or sth like that. And replacing the OpenGL bits with GLEW helps, so that might be a pointer. I really don't know why it is that way, I've compared them, there only were minor differences in how the function to get OpenGL extension addresses was retrieved.

And libHorde3D.so definately links to libGL.so itself, to quote the engine cmake file: "target_link_libraries(Horde3D GL ${HORDE3D_EXTENSION_LIBS})"

EDIT2:
Horde3D:
Code:
extern "C" void (*glXGetProcAddressARB( const unsigned char *procName ))( void );

void *platGetProcAddress( const char *funcName )
{
   return (void *)glXGetProcAddressARB( (const GLubyte *)funcName );
}

GLEW:
Code:
define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)


EDIT3: Oh, and if anyone wants, I have a minimal program showing the problem. With all unnecessary parts stripped away.

EDIT4: I'll try to exchange parts of glew and h3d tomorrow to see what causes the problem.

EDIT5: Enough edited for today, gn8.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group