BindBC Updates: new loader function, SDL_net, streamlined SDL_* version indentifiers

Daniel C dcrep at rep.com
Sat May 23 19:59:51 UTC 2020


On Saturday, 23 May 2020 at 04:07:35 UTC, Mike Parker wrote:
> I suggest you create project/lib and drop the SDL libraries 
> there along with the bindbc-sdl library and pass the path to 
> the linker. Since you should be using the MS linker (see 
> below), it expects the /LIBPATH option 
> (https://docs.microsoft.com/en-us/cpp/build/reference/libpath-additional-libpath?view=vs-2019), which you can add to your dmd commandline as `-L/LIBPATH:lib`. Of course, that's assuming you've got the Microsoft Build Tools installed either independently or as part of a Visual Studio installation. If not, you'll be using the LLVM linker that ships with DMD. I believe in that case it should be `-L-Llib`.
>
> If you really want 32-bit and to statically link with the SDL 
> import libraries, I strongly recommend you use the -m32mscoff 
> dmd options (and the corresponding -ax86_mscoff dub option). 
> The SDL libraries are distributed as COFF, not OMF, so using 
> OPTLINK would require converting the lib files to OMF first.

Thanks. I did have SDL in a project/lib folder and was trying to 
set LIB and then use -L and other options, but I suppose I borked 
that up as well.  Thanks again for the tips!  I'll be mucking 
around with it again later.




More information about the Digitalmars-d-announce mailing list