Compiled, but I have these warnnings... do I need to worry?
Quote:
LINK : warning LNK4098: defaultlib 'LIBC' conflicts with use of other libs; use /NODEFAULTLIB:library FBO.obj : warning LNK4217: locally defined symbol ___glewDeleteFramebuffersEXT imported in function "public: virtual __thiscall FBO::~FBO(void)" (??1FBO@@UAE@XZ) FBO.obj : warning LNK4217: locally defined symbol ___glewBindFramebufferEXT imported in function "public: virtual __thiscall FBO::~FBO(void)" (??1FBO@@UAE@XZ) FBO.obj : warning LNK4217: locally defined symbol ___glewCheckFramebufferStatusEXT imported in function "public: virtual void __thiscall FBO::checkFBOStatus(void)" (?checkFBOStatus@FBO@@UAEXXZ) FBO.obj : warning LNK4217: locally defined symbol ___glewFramebufferTexture2DEXT imported in function "public: virtual void __thiscall FBO::attachTexture(unsigned int,unsigned int,enum FramebufferAttachType)" (?attachTexture@FBO@@UAEXIIW4FramebufferAttachType@@@Z) FBO.obj : warning LNK4217: locally defined symbol ___glewGenFramebuffersEXT imported in function "public: __thiscall FBO::FBO(void)" (??0FBO@@QAE@XZ) FBO.obj : warning LNK4217: locally defined symbol ___GLEW_EXT_framebuffer_object imported in function "public: __thiscall FBO::FBO(void)" (??0FBO@@QAE@XZ) WinPBuffer.obj : warning LNK4217: locally defined symbol ___wglewDestroyPbufferARB imported in function "public: virtual __thiscall WinPBuffer::~WinPBuffer(void)" (??1WinPBuffer@@UAE@XZ) WinPBuffer.obj : warning LNK4217: locally defined symbol ___wglewReleasePbufferDCARB imported in function "public: virtual __thiscall WinPBuffer::~WinPBuffer(void)" (??1WinPBuffer@@UAE@XZ) WinPBuffer.obj : warning LNK4217: locally defined symbol ___wglewReleaseTexImageARB imported in function "public: virtual void __thiscall WinPBuffer::select(void)" (?select@WinPBuffer@@UAEXXZ) WinPBuffer.obj : warning LNK4217: locally defined symbol ___wglewBindTexImageARB imported in function "public: virtual void __thiscall WinPBuffer::deselect(void)" (?deselect@WinPBuffer@@UAEXXZ) WinPBuffer.obj : warning LNK4217: locally defined symbol ___wglewGetPbufferDCARB imported in function "public: __thiscall WinPBuffer::WinPBuffer(int)" (??0WinPBuffer@@QAE@H@Z) WinPBuffer.obj : warning LNK4217: locally defined symbol ___wglewCreatePbufferARB imported in function "public: __thiscall WinPBuffer::WinPBuffer(int)" (??0WinPBuffer@@QAE@H@Z) WinPBuffer.obj : warning LNK4217: locally defined symbol ___WGLEW_NV_render_depth_texture imported in function "public: __thiscall WinPBuffer::WinPBuffer(int)" (??0WinPBuffer@@QAE@H@Z)
Joined: 13 Nov 2004, 08:35 Location: Central Time Zone, USA
As of revision 1544 I get 6 compile errors in VC03, plus 6 of new warnings complaining about inconsistent dll linkage in the AI interface class destructors.
Code:
rts error LNK2019: unresolved external symbol "__declspec(dllimport) const IAICallback::`vftable'" (__imp_??_7IAICallback@@6B@) referenced in function "public: virtual __thiscall IAICallback::~IAICallback(void)" (??1IAICallback@@UAE@XZ)
rts error LNK2019: unresolved external symbol "__declspec(dllimport) const IAICheats::`vftable'" (__imp_??_7IAICheats@@6B@) referenced in function "public: virtual __thiscall IAICheats::~IAICheats(void)" (??1IAICheats@@UAE@XZ)
rts error LNK2019: unresolved external symbol "__declspec(dllimport) const IGlobalAI::`vftable'" (__imp_??_7IGlobalAI@@6B@) referenced in function "public: virtual __thiscall IGlobalAI::~IGlobalAI(void)" (??1IGlobalAI@@UAE@XZ)
rts error LNK2019: unresolved external symbol "__declspec(dllimport) const IGlobalAICallback::`vftable'" (__imp_??_7IGlobalAICallback@@6B@) referenced in function "public: virtual __thiscall IGlobalAICallback::~IGlobalAICallback(void)" (??1IGlobalAICallback@@UAE@XZ)
rts error LNK2019: unresolved external symbol "__declspec(dllimport) const IGroupAI::`vftable'" (__imp_??_7IGroupAI@@6B@) referenced in function "public: virtual __thiscall IGroupAI::~IGroupAI(void)" (??1IGroupAI@@UAE@XZ)
rts error LNK2019: unresolved external symbol "__declspec(dllimport) const IGroupAICallback::`vftable'" (__imp_??_7IGroupAICallback@@6B@) referenced in function "public: virtual __thiscall IGroupAICallback::~IGroupAICallback(void)" (??1IGroupAICallback@@UAE@XZ)
I seriously think this whole vtable issue needs to be solved on GCC/scons only. There are no problems on VStudio with vtables anyway.
(Why should vs need extra defines when gcc messes it up?)
Hi, I've tried compling the source under VS2005 and i get an error about resources.h being missing
It's not there :p
heres the error:
Code:
Compiling resources... .\rts.rc(3) : fatal error RC1015: cannot open include file 'resource.h'. Build log was saved at "file://c:\taspring_0.72b1\rts\build\vstudio7\Release\BuildLog.htm" rts - 1 error(s), 17 warning(s)
if i do a search for "resources" in the source folder, i only get...
\game\gamedata\resources.tdf
\AI\Global\NTAI\resources\
\AI\Global\JCAI\profiles\xta_core_resources.cfg
Joined: 19 Aug 2004, 16:38 Location: Togliatti, Russia
I get linker errors with current SVN code, with IAICallback, IAICheats, IGroupAICallback, and IGlobalAICallback seeming to have missing virtual destructors - whatever the "DECLARE_PURE_VIRTUAL" is supposed to be, it doesn't work.
Joined: 01 Jun 2005, 10:36 Location: The Netherlands
yes, thats latest.
Guess MSVC doesn't support (pure) virtual destructors across DLL boundaries at all...
I'll just disable them and reintroduce all potential bugs related to them on MSVC (and MinGW as I couldn't get it to link destructors...). Disabling it is easy now I got it all macrofied anyway.
Joined: 01 Jun 2005, 10:36 Location: The Netherlands
No.
If you don't give a class with any virtual methods no destructor, the compiler will generate a non-virtual empty default one.
This means that if you have an interface class 'Interface' and a pointer to an object which derives from Interface, deleting the pointer will NOT call the destructor of your derived class (possible memory leaks), ie.
Code:
class Interface { virtual void foo(); } class Object:public Interface { ~Object() { delete[] data; } unsigned char* data; } // in a function: Interface* p = new Object; delete p; // <-- memory leak ~Object is not called, so data is not deleted
I now (or since a while actually) realise spring was working around this by C style casting the pointer p back to Object*, and then deleting it (in AIs).
This happened to work, but it would silently break and crash hard in case you'd ever use multiple or virtual inheritance.
It'd also leak memory/crash in case you'd set up your AI in certain ways, like having a common CMyAI class (implementing the core of your AI) deriving from IGlobalAI and separate derivatives of CMyAI that specialize it for e.g. metal maps, water maps and normal maps, or different mods.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum