Tricks... t3dconsole2 Compile problems

Started by
6 comments, last by Daichi 20 years, 8 months ago
Hey everyone, I''m loosing my head trying to figure out how to compile LaMothe''s t3dconsole2 on my system and of course anything program based off this console. I''m positive that all the DirectX and Library files are included. Everything else seems to compile fine for me. I''ve looked around and I can''t find much relating to these errors I''m getting. So anyway, here is the output from my build log. Any Ideas? Compiling... t3dconsole2.cpp c:\dxsdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 D:\!Projects\C++\!test\t3dconsole2.cpp(144) : warning C4101: ''hdc'' : unreferenced local variable D:\!Projects\C++\!test\t3dconsole2.cpp(325) : warning C4101: ''index'' : unreferenced local variable Linking... t3dconsole2.obj : error LNK2001: unresolved external symbol "int window_client_y0" (?window_client_y0@@3HA) t3dconsole2.obj : error LNK2001: unresolved external symbol "int window_client_x0" (?window_client_x0@@3HA) t3dconsole2.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl Start_Clock(void)" (?Start_Clock@@YAKXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Init(void)" (?DMusic_Init@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Init(void)" (?DSound_Init@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DInput_Init_Keyboard(void)" (?DInput_Init_Keyboard@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DInput_Init(void)" (?DInput_Init@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Init(int,int,int,int)" (?DDraw_Init@@YAHHHHH@Z) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Shutdown(void)" (?DDraw_Shutdown@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "void __cdecl DInput_Shutdown(void)" (?DInput_Shutdown@@YAXXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "void __cdecl DInput_Release_Keyboard(void)" (?DInput_Release_Keyboard@@YAXXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Shutdown(void)" (?DMusic_Shutdown@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DMusic_Delete_All_MIDI(void)" (?DMusic_Delete_All_MIDI@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Shutdown(void)" (?DSound_Shutdown@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Delete_All_Sounds(void)" (?DSound_Delete_All_Sounds@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DSound_Stop_All_Sounds(void)" (?DSound_Stop_All_Sounds@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "unsigned char * keyboard_state" (?keyboard_state@@3PAEA) t3dconsole2.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl Wait_Clock(unsigned long)" (?Wait_Clock@@YAKK@Z) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Flip(void)" (?DDraw_Flip@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DInput_Read_Keyboard(void)" (?DInput_Read_Keyboard@@YAHXZ) t3dconsole2.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Fill_Surface(struct IDirectDrawSurface7 *,unsigned short,struct tagRECT *)" (?DDraw_Fill_Surface@@YAHPAUIDirectDrawSurface7@@GPAUtagRECT@@@Z) t3dconsole2.obj : error LNK2001: unresolved external symbol "struct IDirectDrawSurface7 * lpddsback" (?lpddsback@@3PAUIDirectDrawSurface7@@A) Debug/t3dconsole2.exe : fatal error LNK1120: 22 unresolved externals Error executing link.exe.
Advertisement
have you linked in the .lib's??
ddraw.lib
dxguid.lib
dinput.lib
(im guessing) dsound.lib
( i think )

JUST INCLUDE THE LIBS!
and you need to define the direct input version

//whatever version it uses
#define DIRECTINPUT_VERSION 0x0700


Also....
this might be the problem..
Have you added t3dconsole2.h/.cpp to the project and any other relating files? If not...add them.

[edited by - ACAC on August 11, 2003 6:39:44 AM]
I''m quite sure i have all the directx library''s included.

and according to the comments dxguid.lib isnt needed because of the #define INITGUID statement. but i tried it and it compiles the same.

here is the rest of my debug file. As you can see all the directx librarys are included. So anyone have any other ideas?

Command Lines
Creating temporary file "D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP10F.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_windows" /D "_MBCS" /Fp"Debug/t3dconsole2.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"D:\!Projects\C++\!test\t3dconsole2.cpp"
]
Creating command line "cl.exe @D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP10F.tmp"
Creating temporary file "D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP110.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib DDRAW.LIB DSOUND.LIB DINPUT.lib DINPUT8.lib WINMM.LIB /nologo /subsystem:windows /incremental:yes /pdb:"Debug/t3dconsole2.pdb" /debug /machine:I386 /out:"Debug/t3dconsole2.exe" /pdbtype:sept
".\Debug\t3dconsole2.obj"
]
Creating command line "link.exe @D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP110.tmp"
Did you include t3dconsole1.cpp in your project? The compiler is telling you that those functions were called from t2dconsole2, but it cannot find where those functions are defined. Those functions look to be Andre''s as well, so they might be in one of the other files. Or they might be in his little black box code as well.


First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
Yeah. I figured it out on my own a little bit earlier today.

CaptainJester was right on the mark with the problem tho.

I only feel slightly silly ^^;

Thanks everyone.
-Daichi
I am having a compiling problem too:

Linking...
demo6_1.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4
Debug/TricksCompile.exe : fatal error LNK1120: 1 unresolved externals

not real sure what that means... I''m still figuring it out, but I figured this might be a quick fix if sombody has had a similar problem.
[This is the signature, put somthing funny here]
Sounds like you need to link to ddraw.lib.
quote:Original post by Boo
I am having a compiling problem too:

Linking...
demo6_1.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4
Debug/TricksCompile.exe : fatal error LNK1120: 1 unresolved externals

not real sure what that means... I''m still figuring it out, but I figured this might be a quick fix if sombody has had a similar problem.


You need to link to ddraw.lib and dxguid.lib.

This topic is closed to new replies.

Advertisement