NO

Author Topic: SDL unresolved external link  (Read 5536 times)

ads

  • Guest
SDL unresolved external link
« on: August 05, 2008, 07:18:03 PM »
Hi,

I am trying to get a very simple app running on WM5. I have successfully built the same project on my XP machine, and it runs fine, but I cannot get it to build as a WinCE app. My code is basically the wizard's Hello World app, with a few added lines to get the value from the SDL_Linked_Version function. I have downloaded the SDL source code from the main website. I have included the "SDL.h" file, and added the SDL.lib and SDLmain.lib to the project options. I also have the Microsoft extensions ticked, and compatibility names. Calling conv is set to _cdecl. I have tried setting Runtime library to ST-LIB, MT-LIB, and MT-DLL (none will build).

I can get a very similar result on the XP version by removing the SDL.lib from the options, but I notice that it says "POLINK: error: Unresolved external symbol '_SDL_Linked_Version'." whereas the WINCE build complains of "POLINK: error: Unresolved external symbol 'SDL_Linked_Version'." There is no leading underscore in the WINCE version.

the code I have added to the wizard's project is:
#include "SDL.h" (at beginning)
[...]

    const SDL_version * SDL_Linked_Version(void);
    int vmj = SDL_Linked_Version()->major;
    wchar_t ver[4] = {'V',' ','0'+vmj};
    BeginPaint(hwnd, &ps);
    GetClientRect(hwnd, &rc);
    DrawText(ps.hdc, (ver), -1, &rc, DT_CENTER|DT_VCENTER);

in the Main_OnPaint part of the main.c file.

Any help on getting this built would be much appreciated.


ads

  • Guest
Re: SDL unresolved external link
« Reply #1 on: August 07, 2008, 05:26:51 PM »
Well, I guess not many people use PellesC and SDL...

Anyhow, for those interested, I have managed to get things working. It turns out the libraries from the official SDL site do not work 'out of the box' and need tweaking to get them to work on the WinCE (WMobile) platforms. After another lengthy search, I found some SDL libraries used by the folks at SCUMM. They worked very well, and my test program compiled without a hitch. This is just as well, because the modifications are probably beyond my current capabilities.
 ;D

Pantamorph

  • Guest
Re: SDL unresolved external link
« Reply #2 on: December 22, 2009, 07:05:05 PM »
I'm so sorry for replying to an old topic, but I don't know where else can I post, can you please share your SDL Libs for Pocket PC?
I want to try porting an SDL-based interpreter to my friend's HTC Touch but I can't find these libs anywhere :'(
Thanks in advance
Eugene