Advertisement

downloading source from the WWW

Started by October 11, 2001 03:15 AM
8 comments, last by da_cobra 23 years, 2 months ago
how come whenever I download src-files for simple games from the net the linker gives me errors, I already included the library''s and the include-files for directx in my options-menu?!?
Perhaps you could elaborate on exactly what (type of) errors you get...

Is it some specific library that the linker never finds, or...?
Advertisement
sure, here are the errors :

Linking...
GameMain.obj : error LNK2001: unresolved external symbol "void __cdecl GameOver(void)" (?GameOver@@YAXXZ)
GameMain.obj : error LNK2001: unresolved external symbol "void __cdecl GameDie(void)" (?GameDie@@YAXXZ)
GameMain.obj : error LNK2001: unresolved external symbol "void __cdecl GamePlay(void)" (?GamePlay@@YAXXZ)
GameMain.obj : error LNK2001: unresolved external symbol "void __cdecl GameLevelChange(void)" (?GameLevelChange@@YAXXZ)
GameMain.obj : error LNK2001: unresolved external symbol "void __cdecl GameIntro(void)" (?GameIntro@@YAXXZ)
GameMain.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
GameMain.obj : error LNK2001: unresolved external symbol "long __cdecl RestoreAll(void)" (?RestoreAll@@YAJXZ)
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/GameMain.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.

GameMain.exe - 9 error(s), 0 warning(s)

hope some1 can help me...
someone pls?!?
Are you sure you are compiling it correctly? from that _main error I can see you are trying to compile it down into a console app... make a win32 application project and start from there.

IF you cannot compile the source then contact the author.. most authors like to help.

The nightmare travels across the cosmos with his burning mane. The trail of ash that is produced.

?Have a nice day!?


Don''t know for sure, but it looks like you''re missing an include file somewhere.

I noticed:
unresolved external symbol __imp__timeGetTime@0
as one of your errors.

This would normally be resolved by linking with winmm.lib and including mmsystem.h.

If the compiler is linking with winmm.lib, then mmsystem.h is not being included. You would expect one of the game header files would take care of this include.

I suspect, that you are missing an include somewhere that has unresolved external stuff. This file would also have the mmsystem.h. Either the include is missing from GameMain.cpp or GameMain.h, or the file was not added to the project. I would guess the latter.

What you could do is do a file search in that directory looking for the text "#include " Whatever file comes up, make sure it is included in GameMain.cpp. You may find that this file may not only have mmsystem.h but the other externals as well.

Guy
Adulthood is the vehicle for making you childhood dreams come true.
Advertisement
quote: Original post by GuyJohnston

Don''t know for sure, but it looks like you''re missing an include file somewhere.

I noticed:
unresolved external symbol __imp__timeGetTime@0
as one of your errors.

This would normally be resolved by linking with winmm.lib and including mmsystem.h.

If the compiler is linking with winmm.lib, then mmsystem.h is not being included. You would expect one of the game header files would take care of this include.

I suspect, that you are missing an include somewhere that has unresolved external stuff. This file would also have the mmsystem.h. Either the include is missing from GameMain.cpp or GameMain.h, or the file was not added to the project. I would guess the latter.

What you could do is do a file search in that directory looking for the text "#include " Whatever file comes up, make sure it is included in GameMain.cpp. You may find that this file may not only have mmsystem.h but the other externals as well.

Guy



This probably isn''t your problem, cobra. A missing .h file would give a very different type of error. (I assume you posted all the errors you are getting.)

It looks to me like your project settings are wrong. Why don''t you post the URL you got those src-files from. That way we could figure out exactly what you are doing wrong.
I'd say that the linker hasn't found the .lib or .cpp file needed for your project to compile. Either add the file to your project tree or make sure that the linker does use it.

(I'm not talking about the DX-SDK .lib:s)

If I see correctly it is something wanky with your GameMain.cpp not being compiled and linked correctly....



I'm pretty much guessing so don't blame me if I am wrong

Edited by - WhiteHouse on October 12, 2001 5:04:45 PM

I''ll have to disagree with myself, and agree with Anonymous Poster. I disagree with myself on a regular basis.
It''s just that I have recieved similar errors through
that route.

And for what WhiteHouse said, I also agree.
Missing lib or cpp file. And yea, I would''nt mind downloading those files myself and checking them out.


"I know nothing !" Schultz, Hogan''s Heros
Adulthood is the vehicle for making you childhood dreams come true.
Even if you add the paths to the options you still need to tell the project to use the included lib. Its in project->setting->link in VC++ 6.0. Type the name of the engines .lib file in the object/libraries line. Rebuild all. Hope this helps...

Mike Barela
MikeB@yaya.com
Mike BarelaMikeB@yaya.com

This topic is closed to new replies.

Advertisement