June 16, 2009 Linking to MinGW-generated library woes | ||||
---|---|---|---|---|
| ||||
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 |
June 16, 2009 Re: Linking to MinGW-generated library woes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Fraser | 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.
|
Copyright © 1999-2021 by the D Language Foundation