View previous topic :: View next topic |
Author |
Message |
volcore
Joined: 22 Jan 2007 Posts: 19
|
Posted: Thu Mar 08, 2007 3:16 pm Post subject: libSDL_net unresolved function |
|
|
Hey,
I've had a little trouble getting SDLNet to work, because one function is missing in my Debian SDLnet 1.2 install: SDLNet_Linked_Version
However, it works fine without so far, so here is a patch for you:
Code: |
Index: derelict/DerelictSDLNet/derelict/sdl/net.d
===================================================================
--- derelict/DerelictSDLNet/derelict/sdl/net.d (revision 238)
+++ derelict/DerelictSDLNet/derelict/sdl/net.d (working copy)
@@ -156,8 +156,8 @@
//==============================================================================
extern(C)
{
-typedef SDL_version* function() pfSDLNet_Linked_Version;
-pfSDLNet_Linked_Version SDLNet_Linked_Version;
+//typedef SDL_version* function() pfSDLNet_Linked_Version;
+//pfSDLNet_Linked_Version SDLNet_Linked_Version;
typedef int function() pfSDLNet_Init;
typedef void function() pfSDLNet_Quit;
@@ -232,7 +232,7 @@
private void load(SharedLib lib)
{
- bindFunc(SDLNet_Linked_Version)("SDLNet_Linked_Version", lib);
+ //bindFunc(SDLNet_Linked_Version)("SDLNet_Linked_Version", lib);
bindFunc(SDLNet_Init)("SDLNet_Init", lib);
bindFunc(SDLNet_Quit)("SDLNet_Quit", lib);
bindFunc(SDLNet_ResolveHost)("SDLNet_ResolveHost", lib);
|
Cheers
Volker |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Thu Mar 08, 2007 6:10 pm Post subject: |
|
|
That function is part of the SDL_net API, so I won't be applying your patch to the trunk. The correct solution would be either for you to update/recompile your copy of SDL or make use of Derelict's selective loading mechanism. With the latter option, you can allow your app to continue loading even when SDLNet_LinkedVersion fails to load. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
volcore
Joined: 22 Jan 2007 Posts: 19
|
Posted: Fri Mar 09, 2007 4:00 am Post subject: |
|
|
Its not documented in the official SDL_net 1.2.4 documentation, and it appears that it only appeared in the header since Version 1.2.6. Is requiring this a reasonable? Obviously some platforms (Debian, Ubuntu) do not ship with this little extension out of the box, hence break compability on a range of Systems (although the major and minor versions are correct!).
About the selective loading mechanism, is there any documentation about it? Never heard of it before. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri Mar 09, 2007 7:17 am Post subject: |
|
|
volcore wrote: | Its not documented in the official SDL_net 1.2.4 documentation, and it appears that it only appeared in the header since Version 1.2.6. Is requiring this a reasonable? |
DerelictSDLNet was ported from the SDL_net 1.2.5 headers. This means that 1.2.5 is the minimum version supported out of the box by DerelictSDLNet. See the sticky on SDL versions and Derelict in this forum.
Quote: | About the selective loading mechanism, is there any documentation about it? Never heard of it before. |
Yes, there is a page about it in the Derelict documentation. In the menu on the left, under General Documentation, go to Selective Symbol Loading (the docs are accessible online in case you don't have a copy locally for some reason). _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
volcore
Joined: 22 Jan 2007 Posts: 19
|
Posted: Fri Mar 09, 2007 9:14 am Post subject: |
|
|
Alright then, we'll dig away around it using the selective loading, thanks! |
|
Back to top |
|
|
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|