I need help..

Started by
15 comments, last by da_grat1 19 years, 4 months ago
I downloaded one source from the contest(mini demo) but when i run it, there are 7 errors.. Main.obj : error LNK2001: unresolved external symbol "public: __thiscall MIDI::~MIDI(void)" (??1MIDI@@QAE@XZ) Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MIDI::CloseMidi(void)" (?CloseMidi@MIDI@@QAE_NXZ) Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MIDI::StopMidi(void)" (?StopMidi@MIDI@@QAE_NXZ) Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MIDI::PlayMidi(struct HWND__ *,bool)" (?PlayMidi@MIDI@@QAE_NPAUHWND__@@_N@Z) Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MIDI::OpenMidi(char * const)" (?OpenMidi@MIDI@@QAE_NQAD@Z) What should I do. What should I add in the project-->setting other than this "glu32.lib opengl32.lib glaux.lib" I hope you can help me to solve this problems.. thanks
Advertisement
Looks like you're missing the audio library.
I can't tell you which one it is, but perhaps someone else does.
You could try to see which headers are included, because I bet one of them is the audio library one.
Then search the source files for the corresponding one or try looking for it on the net.
i am using visual C++.. what should i add in the project-->setting.. i only know to add " glu32.lib opengl32.lib glaux.lib winmm.lib".. what else should i add to solve this problem.
It would help if you could tell which demo is that
i downloaded the demo from this website...
contest -->mini demo 2003 and then i download the "Model Demo by Georgi Khomeriki.."
I downloaded the source for that demo and it compiles fine for me.
Are you using the workspace included (Demo.dsw)?
The functions that give you errors are not contained in any library, but are deined in Midi.cpp

There are two files inside the source code folder..
the first one is "main.cpp" and the other one is "midi.cpp"..
which one should i compile first?...when i try to compile the "main.cpp", errors come out such as

Main.obj : error LNK2001: unresolved external symbol "public: __thiscall MIDI::~MIDI(void)" (??1MIDI@@QAE@XZ)

Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MIDI::CloseMidi(void)" (?CloseMidi@MIDI@@QAE_NXZ)

Main.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MIDI::StopMidi(void)" (?StopMidi@MIDI@@QAE_NXZ)

Can you give me the step what to do first?
thanks...
Since you said you are using VisualC++, I think you can compile the whole project at once.
Or, if that doesn't work, try compiling midi.cpp first
thanks a lot.. it works... yeah....
there is another source code that I cannot run... "mini demo-->The Thing 2003 by Andreas Hammar"

when i compile the source code.. this error message come out
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in LIBCD.lib(dbgheap.obj)

MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)

LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library

what should I do to fix this problem..

This topic is closed to new replies.

Advertisement