04.01 - Some Code to Ponder

Started by
41 comments, last by Teej 22 years ago
Hi Teej,

I''m modifying the Q3 source code to add a flamethrower to my mod and when I try doing a build gagamex86.lib I get the following errors outlined below. I beleive it has to do with the shader files and the .tga file that the Q3 source draws to I think!! Any ideas!!

Here they are:

--------------------Configuration: game - Win32 Debug--------------------
Linking...
Creating library .\Debug/qagamex86.lib and object .\Debug/qagamex86.exp
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_RenderScene
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_RegisterShaderNoMip
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_AddLightToScene
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_AddRefEntityToScene
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_ClearScene
ui_players.obj : error LNK2001: unresolved external symbol _UI_AdjustFrom640
ui_players.obj : error LNK2001: unresolved external symbol _trap_S_StartLocalSound
ui_players.obj : error LNK2001: unresolved external symbol _trap_S_RegisterSound
ui_players.obj : error LNK2001: unresolved external symbol _trap_CM_LerpTag
ui_players.obj : error LNK2001: unresolved external symbol _uis
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_RegisterModel
ui_players.obj : error LNK2001: unresolved external symbol _trap_R_RegisterSkin
..\qagamex86.dll : fatal error LNK1120: 12 unresolved externals
Error executing link.exe.

qagamex86.dll - 13 error(s), 0 warning(s)


Imagination is more important then Knowledge
-Albert Einstein
Imagination is more important then Knowledge-Albert Einstein
Advertisement
I know VB pretty well but am a beginner to c. i learnt the console version and not the windows version. My first question is based on the following statement.

And there’s also a couple of header (.H) files:

Utils.h contains a ‘description’, called a prototype or declaration, for each of the functions implemented in Utils.cpp. As long as any other source file has access to this header file, it can use the functions contained inside.

so that means if i make a function in a .cpp file (lets say game.cpp) and i have another .cpp called functions.cpp i couldnt make a call from game.cpp and access the function that is in functions.cpp? So if i wanted to access this function i would have to stick it into a .h file and #include the file at the top of game.cpp?

Thanks
How come this snippet of code doesn't compile?

if (DirectDrawCreateEx(NULL, (void**)&dd, IID_IDirectDraw7, NULL) != DD_OK)
{
return -1;
}

VC complains with the following:

... (48) : error C2115: 'function' : incompatible types
... (48) : warning C4024: 'DirectDrawCreateEx' : different types for formal and actual parameter 3

What's the problem? The code is pretty much the same as the BaseCode1 example (which by the way compiles without any errors or warnings)... I written everything in C in case anyone wonders...

I would appreciate any help, since I've run out of ideas by now...

**************************************************************
In InitTerm.cpp, go to the int DD_Init() function.
You may have this: DSURFACEDESC ddsd;. If so change it to:
DDSURFACEDESC2 ddsd;. Should fix.






[edited by - AJ101 on March 28, 2002 8:34:38 AM]

This topic is closed to new replies.

Advertisement