r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: compile errors
Pages: [1] 2  All
Print
Author Topic: compile errors  (Read 13692 times)
Knight
Guest
« on: May 19, 2006, 07:39:08 pm »

Trying to compile the source with Microsoft visual studio 6 and am having problems.  I have created and compiled small programs in the past but am completely new to this.  Any help is appreciated.  Here are the errors:

:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_inv.c
D:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_main.c
D:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_newfx.c
D:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_parse.c
D:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_pred.c
D:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_scrn.c
D:\games\Quake2\source\client\../qcommon/../game/q_shared.h(36) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
cl_tent.c

If I need the zlib.h file, from where should I obtain it?  Are they all the same or does r1q2 have a zlib.h customized for it?

Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #1 on: May 19, 2006, 08:02:53 pm »

The prerequisites are listed in the r1q2.txt file in the source distribution.
Logged
wision
Member

Posts: 237



« Reply #2 on: May 20, 2006, 06:31:11 am »

!google zlib
Logged
Knight
Guest
« Reply #3 on: May 20, 2006, 06:41:56 pm »

the zlib.h I downloaded is not working . . . Sad
Logged
Knight
Guest
« Reply #4 on: May 20, 2006, 06:55:15 pm »

Ok, I think I got the right zlib.h but now I get these errors:

ai.c
D:\games\Quake2\source\game\g_ai.c(357) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
D:\games\Quake2\source\game\g_ai.c(653) : warning C4305: '=' : truncation from 'const double ' to 'float '
D:\games\Quake2\source\game\g_ai.c(657) : warning C4305: '=' : truncation from 'const double ' to 'float '
D:\games\Quake2\source\game\g_ai.c(661) : warning C4305: '=' : truncation from 'const double ' to 'float '
D:\games\Quake2\source\game\g_ai.c(665) : warning C4305: '=' : truncation from 'const double ' to 'float '
D:\games\Quake2\source\game\g_ai.c(799) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
D:\games\Quake2\source\game\g_ai.c(865) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
D:\games\Quake2\source\game\g_ai.c(1079) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
D:\games\Quake2\source\game\g_ai.c(1096) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
g_chase.c
D:\games\Quake2\source\game\g_chase.c(147) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
g_cmds.c
D:\games\Quake2\source\game\g_cmds.c(838) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
g_combat.c
D:\games\Quake2\source\game\p_weapon.c(1411) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
D:\games\Quake2\source\game\p_weapon.c(1413) : warning C4244: '=' : conversion from 'int ' to 'float ', possible loss of data
q_shared.c
D:\games\Quake2\source\game\q_shared.c(849) : warning C4013: 'sqrtf' undefined; assuming extern returning int
Linking...
   Creating library ./build/binaries/debug/gamex86.lib and object ./build/binaries/debug/gamex86.exp
q_shared.obj : error LNK2001: unresolved external symbol _Sys_DebugBreak
q_shared.obj : error LNK2001: unresolved external symbol _sqrtf
./build/binaries/debug/gamex86.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

thanks for any help . . .
Logged
Knight
Guest
« Reply #5 on: May 20, 2006, 06:58:20 pm »

Ok maybe this is a better output.  This is when I try to just compile gamex86.dll.

--------------------Configuration: game - Win32 Debug--------------------
Linking...
   Creating library ./build/binaries/debug/gamex86.lib and object ./build/binaries/debug/gamex86.exp
q_shared.obj : error LNK2001: unresolved external symbol _Sys_DebugBreak
q_shared.obj : error LNK2001: unresolved external symbol _sqrtf
./build/binaries/debug/gamex86.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

gamex86.dll - 3 error(s), 0 warning(s)

Like I said I am a complete newbie that knows a little c++ so all your patience and help is greatly appreciated.
Logged
Knight
Guest
« Reply #6 on: May 20, 2006, 07:29:12 pm »

Ok, I am an idiot and I post too fast. SORRY.  I am now compiling r1q2.exe and get these errors. 

--------------------Configuration: quake2 - Win32 Debug--------------------
Compiling...
in_win.c
D:\games\Quake2\source\win32\winquake.h(34) : error C2061: syntax error : identifier 'g_pDI'
D:\games\Quake2\source\win32\winquake.h(34) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(35) : error C2061: syntax error : identifier 'g_pMouse'
D:\games\Quake2\source\win32\winquake.h(35) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(36) : error C2061: syntax error : identifier 'g_pKeyboard'
D:\games\Quake2\source\win32\winquake.h(36) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\in_win.c(162) : error C2061: syntax error : identifier 'g_pDI'
D:\games\Quake2\source\win32\in_win.c(162) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\in_win.c(162) : error C2513: '/*global*/ ' : no variable declared before '='
D:\games\Quake2\source\win32\in_win.c(163) : error C2061: syntax error : identifier 'g_pMouse'
D:\games\Quake2\source\win32\in_win.c(163) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\in_win.c(163) : error C2513: '/*global*/ ' : no variable declared before '='
D:\games\Quake2\source\win32\in_win.c(164) : error C2061: syntax error : identifier 'g_pKeyboard'
D:\games\Quake2\source\win32\in_win.c(164) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\in_win.c(164) : error C2513: '/*global*/ ' : no variable declared before '='
D:\games\Quake2\source\win32\in_win.c(180) : error C2065: 'g_pDI' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(189) : warning C4013: 'DirectInput8Create' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(189) : error C2065: 'IID_IDirectInput8' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(208) : error C2065: 'g_pMouse' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(210) : warning C4013: 'IDirectInputDevice8_Unacquire' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(211) : warning C4013: 'IDirectInputDevice8_Release' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(212) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(215) : error C2065: 'g_pKeyboard' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(219) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(222) : warning C4013: 'IDirectInput8_Release' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(223) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(299) : error C2065: 'DISCL_NOWINKEY' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(303) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(317) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(323) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(347) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(356) : warning C4013: 'IDirectInputDevice8_Acquire' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(360) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(361) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(365) : error C2061: syntax error : identifier 'old_state'
D:\games\Quake2\source\win32\in_win.c(365) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\in_win.c(374) : warning C4047: '==' : 'void *' differs in levels of indirection from 'int '
D:\games\Quake2\source\win32\in_win.c(378) : warning C4013: 'IDirectInputDevice8_GetDeviceData' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(477) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(492) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(492) : error C2065: 'c_dfDIMouse2' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(503) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(506) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(507) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(511) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(512) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(536) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(538) : error C2223: left of '->lpVtbl' must point to struct/union
D:\games\Quake2\source\win32\in_win.c(539) : warning C4047: '=' : 'int ' differs in levels of indirection from 'void *'
D:\games\Quake2\source\win32\in_win.c(544) : error C2065: 'old_state' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(559) : warning C4047: '==' : 'void *' differs in levels of indirection from 'int '
D:\games\Quake2\source\win32\in_win.c(676) : error C2065: 'DIMOFS_BUTTON4' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(676) : error C2051: case expression not constant
D:\games\Quake2\source\win32\in_win.c(677) : error C2065: 'DIMOFS_BUTTON5' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(677) : error C2051: case expression not constant
D:\games\Quake2\source\win32\in_win.c(678) : error C2065: 'DIMOFS_BUTTON6' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(678) : error C2051: case expression not constant
D:\games\Quake2\source\win32\in_win.c(679) : error C2065: 'DIMOFS_BUTTON7' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(679) : error C2051: case expression not constant
D:\games\Quake2\source\win32\in_win.c(783) : error C2065: 'DIMOUSESTATE2' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(783) : error C2146: syntax error : missing ';' before identifier 'dims2'
D:\games\Quake2\source\win32\in_win.c(783) : error C2065: 'dims2' : undeclared identifier
D:\games\Quake2\source\win32\in_win.c(785) : warning C4047: '==' : 'void *' differs in levels of indirection from 'int '
D:\games\Quake2\source\win32\in_win.c(793) : warning C4013: 'IDirectInputDevice8_GetDeviceState' undefined; assuming extern returning int
D:\games\Quake2\source\win32\in_win.c(821) : error C2224: left of '.lX' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(821) : error C2224: left of '.lY' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(821) : error C2224: left of '.lZ' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(822) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(823) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(824) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(825) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(826) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(827) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(828) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(829) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(834) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(834) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(838) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(838) : error C2224: left of '.rgbButtons' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(844) : error C2224: left of '.lZ' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(863) : error C2224: left of '.lZ' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(885) : error C2224: left of '.lX' must have struct/union type
D:\games\Quake2\source\win32\in_win.c(886) : error C2224: left of '.lY' must have struct/union type
q_shwin.c
D:\games\Quake2\source\win32\winquake.h(34) : error C2061: syntax error : identifier 'g_pDI'
D:\games\Quake2\source\win32\winquake.h(34) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(35) : error C2061: syntax error : identifier 'g_pMouse'
D:\games\Quake2\source\win32\winquake.h(35) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(36) : error C2061: syntax error : identifier 'g_pKeyboard'
D:\games\Quake2\source\win32\winquake.h(36) : error C2059: syntax error : ';'
snd_win.c
D:\games\Quake2\source\win32\winquake.h(34) : error C2061: syntax error : identifier 'g_pDI'
D:\games\Quake2\source\win32\winquake.h(34) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(35) : error C2061: syntax error : identifier 'g_pMouse'
D:\games\Quake2\source\win32\winquake.h(35) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(36) : error C2061: syntax error : identifier 'g_pKeyboard'
D:\games\Quake2\source\win32\winquake.h(36) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\snd_win.c(113) : error C2065: 'DSERR_FXUNAVAILABLE' : undeclared identifier
D:\games\Quake2\source\win32\snd_win.c(113) : error C2051: case expression not constant
D:\games\Quake2\source\win32\snd_win.c(115) : error C2065: 'DSERR_ACCESSDENIED' : undeclared identifier
D:\games\Quake2\source\win32\snd_win.c(115) : error C2051: case expression not constant
sys_win.c
D:\games\Quake2\source\win32\winquake.h(34) : error C2061: syntax error : identifier 'g_pDI'
D:\games\Quake2\source\win32\winquake.h(34) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(35) : error C2061: syntax error : identifier 'g_pMouse'
D:\games\Quake2\source\win32\winquake.h(35) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(36) : error C2061: syntax error : identifier 'g_pKeyboard'
D:\games\Quake2\source\win32\winquake.h(36) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\sys_win.c(35) : fatal error C1083: Cannot open include file: 'dbghelp.h': No such file or directory
vid_dll.c
D:\games\Quake2\source\win32\winquake.h(34) : error C2061: syntax error : identifier 'g_pDI'
D:\games\Quake2\source\win32\winquake.h(34) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(35) : error C2061: syntax error : identifier 'g_pMouse'
D:\games\Quake2\source\win32\winquake.h(35) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\winquake.h(36) : error C2061: syntax error : identifier 'g_pKeyboard'
D:\games\Quake2\source\win32\winquake.h(36) : error C2059: syntax error : ';'
D:\games\Quake2\source\win32\vid_dll.c(392) : error C2065: 'g_pMouse' : undeclared identifier
D:\games\Quake2\source\win32\vid_dll.c(428) : warning C4013: 'IDirectInputDevice8_Unacquire' undefined; assuming extern returning int
D:\games\Quake2\source\win32\vid_dll.c(436) : warning C4013: 'IDirectInputDevice8_Acquire' undefined; assuming extern returning int
D:\games\Quake2\source\win32\vid_dll.c(574) : error C2065: 'g_pKeyboard' : undeclared identifier
D:\games\Quake2\source\win32\vid_dll.c(678) : error C2065: 'LONG_PTR' : undeclared identifier
D:\games\Quake2\source\win32\vid_dll.c(678) : error C2146: syntax error : missing ';' before identifier 'style'
D:\games\Quake2\source\win32\vid_dll.c(678) : error C2065: 'style' : undeclared identifier
D:\games\Quake2\source\win32\vid_dll.c(679) : error C2143: syntax error : missing ';' before 'type'
D:\games\Quake2\source\win32\vid_dll.c(686) : warning C4013: 'GetWindowLongPtr' undefined; assuming extern returning int
D:\games\Quake2\source\win32\vid_dll.c(689) : error C2065: 'w' : undeclared identifier
D:\games\Quake2\source\win32\vid_dll.c(690) : error C2065: 'h' : undeclared identifier
Generating Code...
Error executing cl.exe.

r1q2.exe - 103 error(s), 20 warning(s)


I have the SDK installed and all the .h files.
Logged
wision
Member

Posts: 237



« Reply #7 on: May 20, 2006, 07:33:45 pm »

did you set directory for includes from directx sdk?
« Last Edit: May 20, 2006, 07:39:07 pm by wision » Logged
Knight
Guest
« Reply #8 on: May 20, 2006, 07:41:20 pm »

How do I do that?
Logged
wision
Member

Posts: 237



« Reply #9 on: May 20, 2006, 07:44:04 pm »

tools > options > projects and solutions > vc directories
if not, try search somewhere in options
Logged
Knight
Guest
« Reply #10 on: May 20, 2006, 07:49:37 pm »

I already tried under tools - options - directories, but I still got the same errors.  I pointed to vc lib for libraries and vc include for the include files.  no luck.
Logged
Knight
Guest
« Reply #11 on: May 20, 2006, 07:51:23 pm »

In other words:

C:\PROGRAM FILES\MICROSOFT DIRECTX SDK (APRIL 2006)\INCLUDE   for include files and
C:\PROGRAM FILES\MICROSOFT DIRECTX SDK (APRIL 2006)\LIB\X86 for library files.
Logged
Bossman
Member

Posts: 486


« Reply #12 on: May 21, 2006, 01:30:01 am »

Are you pointing to right drive lettter I see you using D up there and using C for the other..
Logged
Knight
Guest
« Reply #13 on: May 21, 2006, 01:59:41 am »

Ok most of my problems were becuase I was using VC++ 6.  I had to install the win32 sdk too.  Anyways, I tried VC++ express and almost all of my problems went away.  I am now getting the following errors:



1>------ Build started: Project: quake2, Configuration: Debug Win32 ------
1>Linking...
1>cl_main.obj : error LNK2019: unresolved external symbol _Sys_GetAntiCheatAPI referenced in function _CL_LoadAntiCheat_f
1>files.obj : error LNK2019: unresolved external symbol _unzGoToNextFile referenced in function _FS_LoadPackFile
1>files.obj : error LNK2019: unresolved external symbol _unzGetOffset referenced in function _FS_LoadPackFile
1>files.obj : error LNK2019: unresolved external symbol _unzGetCurrentFileInfo referenced in function _FS_LoadPackFile
1>files.obj : error LNK2019: unresolved external symbol _unzGoToFirstFile referenced in function _FS_LoadPackFile
1>files.obj : error LNK2019: unresolved external symbol _unzGetGlobalInfo referenced in function _FS_LoadPackFile
1>files.obj : error LNK2019: unresolved external symbol _unzOpen referenced in function _FS_LoadPackFile
1>snd_win.obj : error LNK2019: unresolved external symbol _DirectSoundCreate@12 referenced in function _SNDDMA_InitDirect
1>./build/binaries/debug/r1q2.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://d:\games\Quake 2\source\build\temp\r1q2\debug\BuildLog.htm"
1>quake2 - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #14 on: May 21, 2006, 02:05:00 am »

Add ioapi.c and unzip.c to project, add dsound.lib to linker, build in release mode.
Logged
Pages: [1] 2  All
Print
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: compile errors
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines