FLAC not linking on Windows
fnordware opened this issue · 1 comments
I'm stumped. I've got ogg, vorbis, opus, and opusfile linking fine on both Mac and Windows. I try to add FLAC and it works as expected on Mac, but breaks on Windows. I get the standard link errors like:
1>Ogg_Premiere_Import.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl FLAC::Decoder::Stream::set_ogg_serial_number(long)" (?set_ogg_serial_number@Stream@Decoder@FLAC@@UEAA_NJ@Z)
1>Ogg_Premiere_Import.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl FLAC::Decoder::Stream::set_md5_checking(bool)" (?set_md5_checking@Stream@Decoder@FLAC@@UEAA_N_N@Z)
1>Ogg_Premiere_Import.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl FLAC::Decoder::Stream::set_metadata_respond(enum FLAC__MetadataType)" (?set_metadata_respond@Stream@Decoder@FLAC@@UEAA_NW4FLAC__MetadataType@@@Z)
1>Ogg_Premiere_Import.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl FLAC::Decoder::Stream::set_metadata_respond_application(unsigned char const * const)" (?set_metadata_respond_application@Stream@Decoder@FLAC@@UEAA_NQEBE@Z)
I've also tried making my own FLAC projects from scratch and importing the FLAC source right into my main project. I get the same errors each time. Help!
I've set up a branch called "flac_linkproblems" if anyone wants to take a look. In the meantime, the Windows version of this Ogg plug-in just won't have FLAC.
Brendan
Fixed! The FLAC projects were building against "Multi-threaded" instead of "Multi-threaded DLL". I thought the problem would be a simple thing, but the trick is always figuring out which simple thing to do...