[flac-dev] Trying to link against libFLAC_static.lib (windows)

JonY
2012-03-23T08:45:25Z

On 3/23/2012 13:59, Glenn McCord wrote:
> Hi. I'm trying to get a project linking to libFLAC_static.lib but I
> get linker errors such as the following.
>
> The __imp__ prefix seems to imply that some kind of .dll usage is
> happening, which it shouldn't.
>
> All I need is the C lib, so I just build libFLAC_static from within
> VS2010 (I've converted the VS2005 project)
>
> I've then linked to that library by setting the linker settings
> General-> "Additional Library Dependencies" and Input->
"Additional
> Dependencies" appropriately.
>
> Both the main app and the flac libs are build using the "runtime
> library" Multi-Threaded /MT (or /MTd for debug mode)
>

That is the MSVCR* library settings.

> The flac project is using the preprocessor definitions:
>
> WIN32
> NDEBUG
> _LIB
> FLAC__HAS_OGG
> FLAC__CPU_IA32
> FLAC__HAS_NASM
> FLAC__USE_3DNOW
> VERSION="1.2.0"
> FLAC__NO_DLL
>
> I'm not sure what else to try at this stage. I've reached the point
> where I start going in circles and accessing the same internet search
> results. Has anyone got any suggestions?
>

Did you compile the dll earlier? If so, you can try cleaning the project
and rebuilding.

If not, you'd need to look into the headers, check where those problem
functions are defined. Finally, you'll need to trace back any macros
that might be potentially using __declspec(dllimport).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature