M
Michael
I'm trying to compile on VC++ and am having a linking error.
I basically have a library for all my maths functions: 3DMaths.lib, and a
library for my for my engine and also my game, but get the following
problems:
I try and include tnt/tnt.h and tnt/jama/jama.h inside 2 cpp's in my 3DMaths
library, but get the following erros:
What Am I doing wrong, As it undertand the error messages, the librarys
defines a function in the first include, but then tries to do it again??
Surely it should have guard headers to prevent this?
Thanks
Mike
------ Build started: Project: 3DMaths, Configuration: Debug Win32 ------
Compiling...
MPlane3D.cpp
Creating library...
BoundingBox3D.obj : warning LNK4006: "public: __thiscall
TNT::Stopwatch::Stopwatch(void)" (??0Stopwatch@TNT@@QAE@XZ) already defined
in MPlane3D.obj; second definition ignored
Build Time 0:00
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\Engine\3DMaths\Debug\BuildLog.htm"
3DMaths - 0 error(s), 1 warning(s)
------ Build started: Project: resReaderASE, Configuration: Debug
Win32 ------
resReaderASE - up-to-date.
Build Time 0:00
------ Build started: Project: Engine, Configuration: Debug Win32 ------
Creating library...
Replacing .\Debug\stdafx.obj
3DMaths.lib(MPlane3D.obj) : warning LNK4006: "public: __thiscall
TNT::Stopwatch::Stopwatch(void)" (??0Stopwatch@TNT@@QAE@XZ) already defined
in 3DMaths.lib(BoundingBox3D.obj); second definition ignored
Build Time 0:00
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\Engine\Debug\BuildLog.htm"
Engine - 0 error(s), 1 warning(s)
------ Build started: Project: Game3D, Configuration: Debug Win32 ------
Linking...
Engine.lib(BoundingBox3D.obj) : error LNK2005: "public: __thiscall
TNT::Stopwatch::Stopwatch(void)" (??0Stopwatch@TNT@@QAE@XZ) already defined
in Engine.lib(MPlane3D.obj)
Debug/Game3D.exe : fatal error LNK1169: one or more multiply defined symbols
found
Build Time 0:00
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\Game3D\Debug\BuildLog.htm"
Game3D - 2 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 3 succeeded, 1 failed, 0 skipped
I basically have a library for all my maths functions: 3DMaths.lib, and a
library for my for my engine and also my game, but get the following
problems:
I try and include tnt/tnt.h and tnt/jama/jama.h inside 2 cpp's in my 3DMaths
library, but get the following erros:
What Am I doing wrong, As it undertand the error messages, the librarys
defines a function in the first include, but then tries to do it again??
Surely it should have guard headers to prevent this?
Thanks
Mike
------ Build started: Project: 3DMaths, Configuration: Debug Win32 ------
Compiling...
MPlane3D.cpp
Creating library...
BoundingBox3D.obj : warning LNK4006: "public: __thiscall
TNT::Stopwatch::Stopwatch(void)" (??0Stopwatch@TNT@@QAE@XZ) already defined
in MPlane3D.obj; second definition ignored
Build Time 0:00
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\Engine\3DMaths\Debug\BuildLog.htm"
3DMaths - 0 error(s), 1 warning(s)
------ Build started: Project: resReaderASE, Configuration: Debug
Win32 ------
resReaderASE - up-to-date.
Build Time 0:00
------ Build started: Project: Engine, Configuration: Debug Win32 ------
Creating library...
Replacing .\Debug\stdafx.obj
3DMaths.lib(MPlane3D.obj) : warning LNK4006: "public: __thiscall
TNT::Stopwatch::Stopwatch(void)" (??0Stopwatch@TNT@@QAE@XZ) already defined
in 3DMaths.lib(BoundingBox3D.obj); second definition ignored
Build Time 0:00
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\Engine\Debug\BuildLog.htm"
Engine - 0 error(s), 1 warning(s)
------ Build started: Project: Game3D, Configuration: Debug Win32 ------
Linking...
Engine.lib(BoundingBox3D.obj) : error LNK2005: "public: __thiscall
TNT::Stopwatch::Stopwatch(void)" (??0Stopwatch@TNT@@QAE@XZ) already defined
in Engine.lib(MPlane3D.obj)
Debug/Game3D.exe : fatal error LNK1169: one or more multiply defined symbols
found
Build Time 0:00
Build log was saved at "file://c:\Documents and
Settings\Michael\Desktop\Ixium3D\Game3D\Debug\BuildLog.htm"
Game3D - 2 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 3 succeeded, 1 failed, 0 skipped