• Register
Forum Thread
  Posts  
Compiling Quake 2 (Forums : Coding & Scripting : Compiling Quake 2) Locked
Thread Options
Mar 23 2015 Anchor

Hi all. I've downloaded the Quake 2 3.21 source code and I have been trying to compile it in Visual Studio C++ 2005 Express. I've gotten pretty far but now I'm experiencing these errors, and I can't figure out why:

Linking...
vid_dll.obj : error LNK2019: unresolved external symbol __ftol2_sse referenced in function _VID_FreeReflib
vid_menu.obj : error LNK2001: unresolved external symbol __ftol2_sse
sv_init.obj : error LNK2001: unresolved external symbol __ftol2_sse
sv_main.obj : error LNK2001: unresolved external symbol __ftol2_sse
sv_send.obj : error LNK2001: unresolved external symbol __ftol2_sse
sv_world.obj : error LNK2001: unresolved external symbol __ftol2_sse
snd_dma.obj : error LNK2001: unresolved external symbol __ftol2_sse
snd_mem.obj : error LNK2001: unresolved external symbol __ftol2_sse
snd_mix.obj : error LNK2001: unresolved external symbol __ftol2_sse
sv_ents.obj : error LNK2001: unresolved external symbol __ftol2_sse
net_wins.obj : error LNK2001: unresolved external symbol __ftol2_sse
pmove.obj : error LNK2001: unresolved external symbol __ftol2_sse
q_shared.obj : error LNK2001: unresolved external symbol __ftol2_sse
qmenu.obj : error LNK2001: unresolved external symbol __ftol2_sse
cvar.obj : error LNK2001: unresolved external symbol __ftol2_sse
in_win.obj : error LNK2001: unresolved external symbol __ftol2_sse
menu.obj : error LNK2001: unresolved external symbol __ftol2_sse
net_chan.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_tent.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_view.obj : error LNK2001: unresolved external symbol __ftol2_sse
common.obj : error LNK2001: unresolved external symbol __ftol2_sse
console.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_input.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_main.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_newfx.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_scrn.obj : error LNK2001: unresolved external symbol __ftol2_sse
cd_win.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_cin.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_ents.obj : error LNK2001: unresolved external symbol __ftol2_sse
cl_fx.obj : error LNK2001: unresolved external symbol __ftol2_sse
vid_menu.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_user.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_world.obj : error LNK2001: unresolved external symbol ___security_cookie
sys_win.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function _WinError
vid_dll.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_game.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_init.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_main.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_send.obj : error LNK2001: unresolved external symbol ___security_cookie
snd_mem.obj : error LNK2001: unresolved external symbol ___security_cookie
snd_win.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_ccmds.obj : error LNK2001: unresolved external symbol ___security_cookie
sv_ents.obj : error LNK2001: unresolved external symbol ___security_cookie
q_shared.obj : error LNK2001: unresolved external symbol ___security_cookie
q_shwin.obj : error LNK2001: unresolved external symbol ___security_cookie
qmenu.obj : error LNK2001: unresolved external symbol ___security_cookie
snd_dma.obj : error LNK2001: unresolved external symbol ___security_cookie
menu.obj : error LNK2001: unresolved external symbol ___security_cookie
net_chan.obj : error LNK2001: unresolved external symbol ___security_cookie
net_wins.obj : error LNK2001: unresolved external symbol ___security_cookie
pmove.obj : error LNK2001: unresolved external symbol ___security_cookie
files.obj : error LNK2001: unresolved external symbol ___security_cookie
in_win.obj : error LNK2001: unresolved external symbol ___security_cookie
keys.obj : error LNK2001: unresolved external symbol ___security_cookie
md4.obj : error LNK2001: unresolved external symbol ___security_cookie
cmodel.obj : error LNK2001: unresolved external symbol ___security_cookie
common.obj : error LNK2001: unresolved external symbol ___security_cookie
console.obj : error LNK2001: unresolved external symbol ___security_cookie
cvar.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_scrn.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_tent.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_view.obj : error LNK2001: unresolved external symbol ___security_cookie
cmd.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_inv.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_main.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_parse.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_pred.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_cin.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_ents.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_fx.obj : error LNK2001: unresolved external symbol ___security_cookie
cl_input.obj : error LNK2001: unresolved external symbol ___security_cookie
vid_menu.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_user.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_world.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sys_win.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function _WinError
vid_dll.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_game.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_init.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_main.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_send.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
snd_mem.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
snd_win.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_ccmds.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
sv_ents.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
q_shared.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
q_shwin.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
qmenu.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
snd_dma.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
menu.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
net_chan.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
net_wins.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
pmove.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
files.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
in_win.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
keys.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
md4.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cmodel.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
common.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
console.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cvar.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_scrn.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_tent.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_view.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cmd.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_inv.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_main.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_parse.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_pred.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_cin.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_ents.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_fx.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
cl_input.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4
in_win.obj : error LNK2019: unresolved external symbol __imp__ShowCursor@4 referenced in function _IN_ActivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__ClipCursor@4 referenced in function _IN_ActivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__SetCapture@4 referenced in function _IN_ActivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__SetCursorPos@8 referenced in function _IN_ActivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__GetWindowRect@8 referenced in function _IN_ActivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__GetSystemMetrics@4 referenced in function _IN_ActivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__SystemParametersInfoA@16 referenced in function _IN_ActivateMouse
vid_dll.obj : error LNK2001: unresolved external symbol __imp__SystemParametersInfoA@16
in_win.obj : error LNK2019: unresolved external symbol __imp__ReleaseCapture@0 referenced in function _IN_DeactivateMouse
in_win.obj : error LNK2019: unresolved external symbol __imp__GetCursorPos@4 referenced in function _IN_MouseMove
q_shwin.obj : error LNK2019: unresolved external symbol __findfirst64i32 referenced in function _Sys_FindFirst
q_shwin.obj : error LNK2019: unresolved external symbol __findnext64i32 referenced in function _Sys_FindNext
snd_win.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function _SNDDMA_InitWav
sys_win.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
vid_dll.obj : error LNK2001: unresolved external symbol __imp__MessageBoxA@16
sv_ccmds.obj : error LNK2019: unresolved external symbol __localtime64 referenced in function _localtime
sv_ccmds.obj : error LNK2019: unresolved external symbol __time64 referenced in function _time
sys_win.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _Sys_SendKeyEvents
sys_win.obj : error LNK2019: unresolved external symbol __imp__GetMessageA@16 referenced in function _Sys_SendKeyEvents
sys_win.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _Sys_SendKeyEvents
sys_win.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _Sys_SendKeyEvents
sys_win.obj : error LNK2019: unresolved external symbol __imp__CloseClipboard@0 referenced in function _Sys_GetClipboardData
sys_win.obj : error LNK2019: unresolved external symbol __imp__GetClipboardData@4 referenced in function _Sys_GetClipboardData
sys_win.obj : error LNK2019: unresolved external symbol __imp__OpenClipboard@4 referenced in function _Sys_GetClipboardData
sys_win.obj : error LNK2019: unresolved external symbol __imp__SetForegroundWindow@4 referenced in function _Sys_AppActivate
vid_dll.obj : error LNK2001: unresolved external symbol __imp__SetForegroundWindow@4
sys_win.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _Sys_AppActivate
vid_dll.obj : error LNK2019: unresolved external symbol __imp__RegisterHotKey@16 referenced in function _WIN_DisableAltTab
vid_dll.obj : error LNK2019: unresolved external symbol __imp__UnregisterHotKey@8 referenced in function _WIN_EnableAltTab
vid_dll.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function _MainWndProc@16
vid_dll.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongA@8 referenced in function _MainWndProc@16
vid_dll.obj : error LNK2019: unresolved external symbol __imp__RegisterWindowMessageA@4 referenced in function _MainWndProc@16
vid_dll.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function _MainWndProc@16
vid_dll.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongA@12 referenced in function _VID_Front_f
vid_dll.obj : error LNK2019: unresolved external symbol __imp__MoveWindow@24 referenced in function _VID_UpdateWindowPosAndSize .\release/quake2.exe : fatal error LNK1120: 34 unresolved externals

Any idea how I can remedy this? Anyone else have Q2 compiling experience?

OK, So I added an additional Visual Studio library dependency from microsoft visual studio 10, and it eliminated 46 errors. Maybe I just need to add newer libraries?

Mar 24 2015 Anchor

Hey I am having the exact same problem were you able to completely fix this issue? Was it just updating library dependencies? Please let me know I've been messing with this for a couple of days!

Mar 24 2015 Anchor

I don't use 2005 to compile my Q2 code, I use 2010. I found newer then 2010 compiled but creates binaries that don't work properly for some reason.

I want to say you also need the DX SDK. I needed to install the DX 9 SDK to compile code that needed that in MSVC Community 2013 even though I has the Win 8 SDK installed.

Mar 24 2015 Anchor

I have the dx sdk installed, was there anything else that you had to do to make it compile properly?

Mar 25 2015 Anchor

tiresandplanes, looking around I've found some forums that seem to help. I succesfully compiled mods with the q2 source but not the actual game client. I will be trying that soon and let you know what I come up with.

The advice I checked out was that its easier to add the files manually and then compile, as opposed to trying to open a solution and compiling that. Not sure which approach you're taking.

Well I just tried compiling a dll for the pure q2 source, and it worked. I used Microsoft Visual C++ 5.0 (the version that came out in 97 that a lot of oldschool q2 modders used) and that worked. I am working with the 3.21 source. I just compiled the 'game' folder. I haven't tried the client folder which is supposed to result in the .exe, nor have I tried the ref_gl or ref_soft folder files. I just added the .c files and .h files and the single game.def into a single folder called "Source" in MVSC++5.0 and compiled it and it gave me no problems whatsoever. Here's a few things..

First, if you'd like to give Visual C++ 5.0 a try let me know. I got it off a torrent and it took a long time to seed, so I'm guessing its pretty rare. I'm willing to share ;)

Second, try out these suggestions that can help you possibly.

Quakewiki.net <---This is old. It's primarily for Visual Studio C++ 5.0 and I followed it to the T and it worked so again, I can offer that to you if you want. You can also go back on that webpage and find more tutorials for other compilers, but I would only trust this one since the others are very outdated. I tried pretty much all of them and there's a lot of tweaks that have to be made. However the best second option is the LCC tutorial. I have all the files for that as well, and a few more tutorials from other websites to boot if you're interested.

or

Forum.tastyspleen.net <-- the very first post and last post on the bottom of the first page are quite useful.

Finally, I want to add that previously, even though adding more libraries did solve some things, I'm quite certain I added some that caused more problems. In my head I thought I'll just reference and point to every freaking lib folder I have, but that created some conflicts for sure. Your best bet is to add the files manually rather than opening up some outdated solution or workspace.

I'm going to keep moving forward, let you know what I come up with!

Ok I tried compiling the quake2.exe...get similar errors. 15..and then I made some changes..then I got 400+ errors hehe. Here's what I'm learning:

peewee_rota wrote: The ref_soft won't compile in certain situations due to the assembly code in the project....I'm pretty certain that the quake2 client requires direct sound and windows SDK libraries.


So that's a helpful hint if you're having trouble with the client. I'm going to look into that. At this point I'm not terribly concerned about compiling the client because its not a part of my immediate goals but it might be fun as a challenging project to see if I can get it to work and then share my results.

Edited by: djk30

Mar 25 2015 Anchor

Hey I've been using visual c++ 5.0 but was wondering if you could link me to the torrent because my version isn't the right one for the job I don't think.

Mar 25 2015 Anchor

Well I found this one.. Visual C ++ 6.00
Kickass.to

ah here we go..this is the original one I downloaded. I'm still seeding it too. MSVC 5.00 with a 6.00 patch

Kickass.to

Edited by: djk30

Mar 25 2015 Anchor

Hey! I tried again with my version of visual c++ and it works now! I can't compile the .exe but I can get the game folder and therefore can get a new gamex86.dll so everything is good on that front. Thanks for the help btw!

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.