Borland C libs for SDL 1.2.9

Hello,

I upgraded from SDL 1.2.8 to SDL 1.2.9 and when I recompiled using the SDL.lib
and SDLMain.lib provided with the sources, I see that the compiling versions
belong to 1.2.8 release. Actually, the modification date of both files on SDL
1.2.9 is the same as those on 1.2.8. I can generate SDL.lib from SDL.dll using
implib, but I don’t know how to generate SDLMain.lib (without recompiling the
full SDL, because that leads to another kind of problems).

My questions:

  • Is there any problem if I use a diferent version of the lib files when
    compiling and at runtime ?
  • Can I generate (without recompiling sources) SDLMain.lib? (doing sthg
    similar to using implib to generate SDL.lib)

Thank you in advance!

I don’t mix libraries version to avoid a possible unknown behaviour (usually, errors).
But I’m not sure if you can do that.

Anyway, there is a way to compile only sdlmain. Go to libsdl source code, look for src/main/win32 and there is a file, SDL_win32_main.c.
Now, you only have to compile it with Borland C but only to get the object code (do not link it). And finally, you will have a sdl_main.obj :slight_smile:

On the other hand, did you mean that you can use SDL.dll with Borland compiler without to recompile the whole library with Borland? I’m very interested on that success, could you explain me that?
Thanks and good luck!–

Roberto Prieto
MegaStorm Systems ©
http://www.megastormsystems.com

---- “Albert Fern?ndez Marsal” escribi?:

Hello,

I upgraded from SDL 1.2.8 to SDL 1.2.9 and when I recompiled using the SDL.lib
and SDLMain.lib provided with the sources, I see that the compiling versions
belong to 1.2.8 release. Actually, the modification date of both files on SDL
1.2.9 is the same as those on 1.2.8. I can generate SDL.lib from SDL.dll using
implib, but I don’t know how to generate SDLMain.lib (without recompiling the
full SDL, because that leads to another kind of problems).

My questions:

  • Is there any problem if I use a diferent version of the lib files when
    compiling and at runtime ?
  • Can I generate (without recompiling sources) SDLMain.lib? (doing sthg
    similar to using implib to generate SDL.lib)

Thank you in advance!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

What errors did you get when you try to compile SDL_win32_main.c?
You shouldn’t get any errors, is a quite simple file… but remember, you dont have to link, only you need de object file (on Visual C it will be an .obj and with GNU C it will be an .o file, I dont know Borland compiler but I think an .obj file).–

Roberto Prieto
MegaStorm Systems ©
http://www.megastormsystems.com

---- “Albert Fern?ndez Marsal” escribi?:

I tried to compile only the SDLMain project with borland, but I must
use the C calling standard. With that SDLMain.lib included in my project, I
get a lot of errors due to the name mangling of the functions. I should use
the Standard calling convention, but then, SDL_win32_main.c doesn’t compile.

For the other question, when I used the 1.2.8 version, I included in
my project both SDL.lib and SDLMain.lib (provided with the sources) and put
the SDL.dll in the same directory of the executable file and voila, that
works!

Thank you!

ALBERT FERNANEZ MARSAL
www.cirsa.com

-----Mensaje original-----
De: dm2 at mi.madritel.es [mailto:dm2 at mi.madritel.es]
Enviado el: lunes, 05 de septiembre de 2005 11:28
Para: SDL at libsdl.org
CC: Albert Fern?ndez Marsal
Asunto: Re: [SDL] Borland C libs for SDL 1.2.9

I don’t mix libraries version to avoid a possible unknown behaviour
(usually, errors).
But I’m not sure if you can do that.

Anyway, there is a way to compile only sdlmain. Go to libsdl source code,
look for src/main/win32 and there is a file, SDL_win32_main.c.
Now, you only have to compile it with Borland C but only to get the object
code (do not link it). And finally, you will have a sdl_main.obj :slight_smile:

On the other hand, did you mean that you can use SDL.dll with Borland
compiler without to recompile the whole library with Borland? I’m very
interested on that success, could you explain me that?
Thanks and good luck!


Roberto Prieto
MegaStorm Systems ©
http://www.megastormsystems.com

---- “Albert Fern?ndez Marsal” escribi?:

Hello,

I upgraded from SDL 1.2.8 to SDL 1.2.9 and when I recompiled using the
SDL.lib
and SDLMain.lib provided with the sources, I see that the compiling
versions
belong to 1.2.8 release. Actually, the modification date of both files on
SDL
1.2.9 is the same as those on 1.2.8. I can generate SDL.lib from SDL.dll
using
implib, but I don’t know how to generate SDLMain.lib (without recompiling
the
full SDL, because that leads to another kind of problems).

My questions:

  • Is there any problem if I use a diferent version of the lib files when
    compiling and at runtime ?
  • Can I generate (without recompiling sources) SDLMain.lib? (doing sthg
    similar to using implib to generate SDL.lib)

Thank you in advance!


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

<dm2 mi.madritel.es> writes:

What errors did you get when you try to compile SDL_win32_main.c?
You shouldn’t get any errors, is a quite simple file… but remember, you
dont have to link, only you need de
object file (on Visual C it will be an .obj and with GNU C it will be an .o
file, I dont know Borland compiler but
I think an .obj file).

Roberto Prieto
MegaStorm Systems ©
http://www.megastormsystems.com

---- “Albert Fern?ndez Marsal” <afmarsal cirsa.com> escribi?:

I tried to compile only the SDLMain project with borland, but I must

use the C calling standard. With that SDLMain.lib included in my project, I
get a lot of errors due to the name mangling of the functions. I should use
the Standard calling convention, but then, SDL_win32_main.c doesn’t
compile.

For the other question, when I used the 1.2.8 version, I included in

my project both SDL.lib and SDLMain.lib (provided with the sources) and put
the SDL.dll in the same directory of the executable file and voila, that
works!

Thank you!

ALBERT FERNANEZ MARSAL
www.cirsa.com

No, no problems when only compiling. I’ve created the .obj file, added to my
project, but I still get an unresolved external _SDL_GetError. Including both
SDL.lib and (SDLMain.lib or SDLMain.obj), this is the only function that makes
the linker complain.

Now I have the same problem with both versions of SDL (1.2.8 and 1.2.9)…

Thank you.

No, no problems when only compiling.
I’ve created the .obj file, added to my
project, but I still get an unresolved
external _SDL_GetError. Including both
SDL.lib and (SDLMain.lib or SDLMain.obj),
this is the only function that makes
the linker complain.

Albert,

I have had this error using downloaded SDL-binaries with Borland, but
could fix it by using coff2omf instead of implib for creating a Bcc32
compatible SDL.lib. I don’t know why but these implib and coff2omf
tools are a bit flaky.

Regards

Olov