VOGONS


First post, by Thraka

User metadata
Rank Member
Rank
Member

I'm just spinning gears here for hours on hours trying to get this thing to compile. The existing Wiki isn't any help, which is too bad 🙁

If someone who knows C++ and Visual Studio could please provide how to get this thing compiled, I would be very greatful.

What I've done so far:
1) I've upgraded the project to Visual Studio 2008.
2) Downloaded libpng, sdl, sdl_net, zlib.
3) Installed Windows SDK 6.1 (Vista I think)
4) Updated reference paths to find the SDL, SDL_NET, ZLIB, PNG include files

I kept getting linker errors when it was trying to import .lib files. Since the .lib files seemed to be missing, i generated the sdl and sdl_net lib files from the .dll files included in the .72 release. I did this by:

dumpbin /exports SDL_net.dll /out:sdl_net.def
lib /out:sdl_net.lib /def:sdl_net.def /machine:x86

I also got lib files for png and zlib, which I just downloaded the DLL's off the net and did the same calls to generate them. I also found a sdlmain.lib from the distro of sdl. Otherwise I had no idea where it was coming from, but it wanted it...

I then was getting an error that curses.lib couldn't be found. After much search I was unable to find source for this library. I found the config.h had it turned off so I wasn't sure why the linker was trying to link to it. I checked the project file's linker command line and sure enough it was included on there. I removed it.

I finally got it to link all the way through but now I get a hundreds of errors like so:

1>cdrom.obj : error LNK2019: unresolved external symbol _SDL_CDClose referenced in function "public: virtual __thiscall CDROM_Interface_SDL::~CDROM_Interface_SDL(void)" (??1CDROM_Interface_SDL@@UAE@XZ)
1>cdrom.obj : error LNK2019: unresolved external symbol _SDL_CDStatus referenced in function "public: virtual bool __thiscall CDROM_Interface_SDL::SetDevice(char *,int)" (?SetDevice@CDROM_Interface_SDL@@UAE_NPADH@Z)
1>cdrom_image.obj : error LNK2019: unresolved external symbol _SDL_mutexV referenced in function "public: virtual bool __thiscall CDROM_Interface_Image::PlayAudioSector(unsigned long,unsigned long)" (?PlayAudioSector@CDROM_Interface_Image@@UAE_NKK@Z)
1>cdrom_image.obj : error LNK2019: unresolved external symbol _SDL_mutexP referenced in function "public: virtual bool __thiscall CDROM_Interface_Image::PlayAudioSector(unsigned long,unsigned long)" (?PlayAudioSector@CDROM_Interface_Image@@UAE_NKK@Z)
1>ipx.obj : error LNK2019: unresolved external symbol _SDLNet_UDP_Close referenced in function "void __cdecl DisconnectFromServer(bool)" (?DisconnectFromServer@@YAX_N@Z)
1>ipxserver.obj : error LNK2001: unresolved external symbol _SDLNet_UDP_Close

I think this is related to me generating the .LIB files. I have no clue. I don't like C++ 😀

Please help me. This is my last hope for trying to fix my Global Conquest crash issue that has been pluaging me for years now.

Reply 1 of 6, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

why generate the lib files ?
I thought that you could download them from libsdl.org just fine. Harekiet and wd use visual C. So you have to rely on them.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 6, by kekko

User metadata
Rank Oldbie
Rank
Oldbie

Decompress the attached .zip file into the dosbox sources directory (in overwrite), it contains the minimal sdl libs to compile a "release" build.
It does not compile with support for network and screenshots.

bye!

http://rapidshare.com/files/137465199/dosbox_addon.zip.html

Last edited by kekko on 2008-08-15, 08:27. Edited 1 time in total.

Reply 3 of 6, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

sorry kekko. uploads are broken currently. I hope they will work tomorrow again ( /tmp partition is full)

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 6, by Thraka

User metadata
Rank Member
Rank
Member

I see now that the SDL page has a "Developer Libraries" section. Since original compile asked for the .h, I just assumed I needed to download the source code, which didn't contain the lib files. Thanks for the help, I'll try all this out and hopefully it will work out 😉