-
header files
I keep getting an error while compiling saying it can't find my defs.h file. In my main .cpp, I declare it like
#include "defs.h"
and this is my defs.h:
#ifndef _DEFS_H
#define _DEFS_H
extern int rdesc[2];
extern int rnum;
extern int SetRoom();
extern int DispRoom(int);
#endif
-
Is defs.h in the same directory as the .cpp file which includes it?
-
Got that working, but now I get this:
C:\TextGame\Game\engine.cpp(14) : warning C4551: function call missing argument list
Linking...
rooms.obj : error LNK2001: unresolved external symbol "int * rdesc" (?rdesc@@3PAHA)
Debug/Game.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Game.exe - 2 error(s), 1 warning(s)
-
> warning C4551: function call missing argument list
Well look at your code, and the prototype, then figure out which is correct
> unresolved external symbol "int * rdesc" (?rdesc@@3PAHA
Put
int rdesc[2];
In one of your .cpp files