AutoDLL

FoxyBrown via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 6 10:26:24 PDT 2017


On Thursday, 6 July 2017 at 16:14:18 UTC, Mike Parker wrote:
> On Thursday, 6 July 2017 at 12:15:57 UTC, FoxyBrown wrote:
>
>>
>> //pragma(lib, "portaudio_x86.lib"); // Doesn't work because 
>> libs are invalid
>
> Probably just a OMF/COFF issue. If you try to link with a COFF 
> library while compiling with 32-bit DMD in its default 
> configuration on Windows, you'll get such errors. You'll need 
> to compile with -m32mscoff MS linker instead. Either that, or 
> run coffimplib [1] (doc at [2]) on the portaudio dll.
>
> [1] http://ftp.digitalmars.com/coffimplib.zip
> [2] http://www.digitalmars.com/ctg/coffimplib.html

I tried some of that stuff and it didn't work so I gave up and 
found the code above but it only printed the names so I added the 
ability to load the functions. I kept on getting that the was 
invalid. I figured it was more of a mess to try to get the libs 
right since what if I need to use a coff and omf? Seems like a 
royal pain in the butt to deal with.



More information about the Digitalmars-d-learn mailing list