Archived

This topic is now archived and is closed to further replies.

PyroBoy

Vorbisfile Build Problems

Recommended Posts

I''m having a helluva time getting the ogg vorbis vorbisfile library to build properly. I''m trying to link it in staticly under win32 in VC++ 6. I linked to ogg_static.lib, vorbis_static.lib, and vorbisfile_static.lib. All 3 are required for vorbisfile decoding - leaving any of them out results in a truckload of unresolved external symbols. Then it was giving me grief about various symbols already being defined in VC''s default runtime libs. Apperantly you have to switch your project''s code generation settings to "Multithreaded DLL" or "Debug Multithreaded DLL". So I tried it both ways, and in both cases the conflicting symbol errors went away, but a linker warning remained: LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library What else do I have to do to get the linker to cooperate?

Share this post


Link to post
Share on other sites
Tried that. I get a massive pile of unresolved symbols, even after linking in the other libs by hand. Besides, what happens one day when I want to use a function found in one of the conflicting standard libs? Does that mean I''m SOL for ogg vorbis playback alongside that function?

This sucks... I''m using vorbisfile for an audio library and I assume all this build settings stuff will have to be done to every project that wants to use *my* library. I don''t relish the idea of having to screw with all this every time I want sound in a game. I''d like to get it down to the point where an app can just include the headers, link in a .lib, and go.

There must be a better way...

Share this post


Link to post
Share on other sites
quote:
Original post by PyroBoy
Besides, what happens one day when I want to use a function found in one of the conflicting standard libs? Does that mean I''m SOL for ogg vorbis playback alongside that function?

I''m using the standard functions without any problems alongside VorbisFile, so I don''t think you''ll have to worry about not getting to use them. Once you get it setup, it should work normally from then on.
quote:
Original post by PyroBoy
This sucks... I''m using vorbisfile for an audio library and I assume all this build settings stuff will have to be done to every project that wants to use *my* library.

Only if you use it as a static library. If you compile it into a dynamic library (a DLL in Windows), then they don''t (well: shouldn''t) have to set any of that up.

quote:
Original post by PyroBoy
There must be a better way...

If you can find one, tell me . It''s so much easier to link with the libraries I use (SDL and Ogg/Vorbis/VorbisFile are both difficult in MSVC) in GCC that I rarely even test my library in Windows anymore. This, of course, leads to problems in Windows that aren''t there in other OS''s (like OpenAL''s chaining feature working properly outside of Windows, but not in Windows ).

[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites