Linking to MinGW-generated library woes

Robert Fraser fraserofthenight at gmail.com
Mon Jun 15 21:56:11 PDT 2009


Robert Fraser wrote:
> Has anyone been able to successfully link (statically) to a library 
> generated by MinGW? I compiled the libraries in question (FFMpeg avutil, 
> avformat, and avcodec) under MinGW, ran objconv on it to convert it to 
> OMF (no errors) and passed it to optlink along with MinGW's libgcc. At 
> this point I got quite a few undefined references:
> 
>  Error 42: Symbol Undefined _snprintf
>  Error 42: Symbol Undefined ___strtod
>  Error 42: Symbol Undefined _gettimeofday
>  Error 42: Symbol Undefined _strncasecmp
>  Error 42: Symbol Undefined _strcasecmp
>  Error 42: Symbol Undefined ___mingw_vfprintf
>  Error 42: Symbol Undefined ___fpclassifyf
> 
> I've tried with different combinations of adding mingwex and libcoldname 
> to the mix, but not only do they add some "previous definition" 
> conflicts, neither was able to fix any of the linker errors.
> 
> I might be able to manually find & implement all those functions in the 
> MinGW source, would this be the best way?
> 
> Thanks,
> Robert

Never mind; they weren't as hard to implement as I thought.


More information about the Digitalmars-d-learn mailing list