Page 1 of 1
IrrSpitz compilation
Posted: Sat Jun 24, 2006 11:46 am
by husqvarna
Hello,
I’m using IrrSpintz in a .net 2003 C++ / C# managed code. If I compile my application in “Debug” mode, everything is ok. But know, I must compile my code in “Release” mode. But I have several problem.
If I use the precompileted header (/Yu) I have this message :
Code: Select all
warning C4067: jetons inattendus après la directive du préprocesseur - nouvelle ligne attendue
fatal error C1010: fin de fichier inattendue lors de la recherche d'une directive d'en-tête précompilé
If I don’t use the precompileted header I have 27 time this error message :
Code: Select all
ESTGA 3d error LNK2001: symbole externe non résolu "const type_info::`vftable'" (??_7type_info@@6B@)
…
ESTGA 3d fatal error LNK1120: 27 externes non résolus
What I’m dowing wrong ? Why is it working in « Debug » mode ?
Thanks, it is my last problem and my application is released!!!
Posted: Sat Jun 24, 2006 12:03 pm
by Strong99
could you post the error in english plz?
i can't translate it...
Posted: Sat Jun 24, 2006 12:43 pm
by hybrid
I don't know .net that good (and french neither), but here are some guesses:
Try to enable runtime type information (I think it was something with -G, bt my msvc is not running currently). And check that all new classes you have introduced by deriving from ISomething interfaces have all necessary abstract methods implemented (vtable could mean a problem with non-implemented interface classes).
Posted: Sat Jun 24, 2006 12:45 pm
by husqvarna
strong99 wrote:could you post the error in english plz?
i can't translate it...
If I use the precompileted header (/Yu) I have this message :
Code: Select all
warning C4067: unexpected tokens
following preprocessor directive - expected a newline
"Fatal error C1010: unexpected end of file while looking for precompiled header directive"
If I don’t use the precompileted header I have 27 time this error message :
Code: Select all
error LNK2001: unresolved external symbol ....
Error LNK1120 gives you a count (number) of unresolved externals for this link
Posted: Sat Jun 24, 2006 12:55 pm
by husqvarna
hello,
The error comme from my class "MyEventListener" (error C1010), maybe because the class is not managed??
But i can not make "MyEventListener" managed, with "__gc" , I got the following error :
Code: Select all
error C2811: 'irr::IEventReceiver' : une classe __gc ne peut hériter que d'une classe __gc ou d'une interface __gc
http://msdn2.microsoft.com/en-us/library/f7z685ew.aspx
Code: Select all
#include <irrlicht.h>
#include <iostream>
using namespace irr;
using namespace irr::core;
#pragma comment(lib, "IrrSpintz.lib")
class MyEventReceiver : public IEventReceiver
{
public:
MyEventReceiver()
{
}
MyEventReceiver(scene::ISceneNode* mapNode)
{
// store pointer to terrain so we can change its drawing mode
this->mapNode = mapNode;
}
MyEventReceiver(scene::ISceneNode* mapNode, irr::IrrlichtDevice* device)
{
this->mapNode = mapNode;
this->device = device ;
}
bool OnEvent(SEvent event)
{
// check if user presses a key
if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown)
{
switch (event.KeyInput.Key)
{
case irr::KEY_KEY_W: // switch wire frame mode
mapNode->setMaterialFlag(video::EMF_WIREFRAME, !mapNode->getMaterial(0).Wireframe);
return true;
case irr::KEY_KEY_D: // toggle detail map
mapNode->setMaterialType(
mapNode->getMaterial(0).MaterialType == video::EMT_SOLID ?
video::EMT_DETAIL_MAP : video::EMT_SOLID);
return true;
// escape the 3d Viewer Windows
case irr::KEY_ESCAPE:
device->closeDevice() ;
return true ;
}
}
return false;
}
private:
scene::ISceneNode* mapNode;
irr::IrrlichtDevice* device;
};
Main class of 3d :
Code: Select all
#pragma once
#include <irrlicht.h>
#include <rect.h>
#include <aabbox3d.h>
#include <SMesh.h>
//#include <iostream>
#using <mscorlib.dll>
#include <iostream>
#include "MyEventReceiver.cpp" ;
using namespace System;
//#include <string>
//using namespace std;
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment( lib, "IrrSpintz.lib" )
namespace ESTGADLL
{
public __gc class IRRSpintz_Process
{
public :
void DisplayScene(void) ;
int CreateDriver(char i,int screen_x, int screen_y) ;
void modify_Z(int nb);
void AddNodeFromFile(System::String* filename,System::String* filename_texture,bool texture_bool) ;
irr::IrrlichtDevice* device ;
video::IVideoDriver* driver ;
scene::ISceneManager* smgr ;
gui::IGUIEnvironment* env ;
scene::ICameraSceneNode* camera ;
scene::ISceneNode* mapNode ;
private :
void SetWireFrame() ;
void SetTexture(System::String* filename) ;
};
}
Posted: Sat Jun 24, 2006 12:57 pm
by husqvarna
hybrid wrote:I don't know .net that good (and french neither), but here are some guesses:
Try to enable runtime type information (I think it was something with -G, bt my msvc is not running currently). And check that all new classes you have introduced by deriving from ISomething interfaces have all necessary abstract methods implemented (vtable could mean a problem with non-implemented interface classes).
sorry
with runtime type information enabled that change nothing.