Jump to content
  • Advertisement
Sign in to follow this  
deathwearer

Got Linker error(found)

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having linker error while trying to add sound to my game. I don't know how, i'v read 2-3 tutorial and none talk about something i forgot. Yes i did include SDL_Mixer.h Linking... MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library Interface.obj : error LNK2019: unresolved external symbol _Mix_LoadWAV_RW referenced in function "public: void __thiscall CInterface::Init_Audio(void)" (?Init_Audio@CInterface@@QAEXXZ) Interface.obj : error LNK2019: unresolved external symbol _Mix_OpenAudio referenced in function "public: void __thiscall CInterface::Init_Audio(void)" (?Init_Audio@CInterface@@QAEXXZ) Interface.obj : error LNK2019: unresolved external symbol _Mix_PlayChannelTimed referenced in function "public: void __thiscall CInterface::Play_Wav(void)" (?Play_Wav@CInterface@@QAEXXZ) main.obj : error LNK2019: unresolved external symbol _Mix_CloseAudio referenced in function _SDL_main Debug/Tetris.exe : fatal error LNK1120: 4 unresolved externals [Edited by - deathwearer on August 19, 2005 1:49:58 PM]

Share this post


Link to post
Share on other sites
Advertisement
AFAIK for the first LNK4098 error, you have to compile with Multithreaded DLL (Project options -> C++ -> Code generation). As for the rest, you have to link (not only #include <SDL_mixer.h>!) with SDL_Mixer.lib (or sth like that) in Linker tab (also in Project options).

BTW, all your questions are pretty frequent and are answered in standard SDL docs, so please RTFM :-)

Share this post


Link to post
Share on other sites
Quote:
Original post by Koshmaar
AFAIK for the first LNK4098 error, you have to compile with Multithreaded DLL (Project options -> C++ -> Code generation). As for the rest, you have to link (not only #include <SDL_mixer.h>!) with SDL_Mixer.lib (or sth like that) in Linker tab (also in Project options).

BTW, all your questions are pretty frequent and are answered in standard SDL docs, so please RTFM :-)



1. No that was because i didn'T corectly linked the SDL_Mixer.lib and i tought i did, so i was like "what the... everything seems ok"

2. Yes will do in the futur, but that's because I'm not so fammiliar with the docs and all. I never worked with an API before.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!