building hello world... [solved]
Posted: Sun May 18, 2008 3:22 pm
hi,
i followed the video tutorial to compile Irrlicht so my .dll is ok but i cant compile my helloworld.
i use code::blocks 8.02
dx8 sdk
MS platform SDK
MSVC toolkit 2003
anyway, all the files in there...
here is my "helloworld" code (kinda the same as the official tuto)
and here the error :
its the same if i link or not the toolkit libraries (because libc.lib is in it)
i dont get it.
i was glad to find at least an engine that seem more simple or understandable for a noob like me but i get stuck even before being able to test it...
how can i compile my helloworld please ?
thx
cya.
i followed the video tutorial to compile Irrlicht so my .dll is ok but i cant compile my helloworld.
i use code::blocks 8.02
dx8 sdk
MS platform SDK
MSVC toolkit 2003
anyway, all the files in there...
here is my "helloworld" code (kinda the same as the official tuto)
Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
int main()
{
/* rendu*/
IrrlichtDevice *device =
createDevice(EDT_SOFTWARE, dimension2d<s32>(512,384), 16,
false, false, false, 0);
device->setWindowCaption(L"Hello World!");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Titre du GUI",
rect<int>(10,10,200,22), true);
/* model */
IAnimatedMesh* mesh = smgr->getMesh("C:/programmation/projets/helloworld/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture(0, driver->getTexture("C:/programmation/projets/helloworld/sydney.bmp"));
}
/* caméra */
smgr->addCameraSceneNode(0, vector3df(0, 30, -40), vector3df(0, 5, 0));
/* loop */
while(device->run())
{
driver->beginScene(true, true, SColor(255, 100, 101, 140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
and here the error :
the /NODEFAULTLIB:libci.lib dont work here||=== helloworld, Release ===|
LIBC.lib(wincrt0.obj)||error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup|
bin\Release\helloworld.exe||fatal error LNK1120: 1 unresolved externals|
||=== Build finished: 2 errors, 0 warnings ===|
its the same if i link or not the toolkit libraries (because libc.lib is in it)
i dont get it.
i was glad to find at least an engine that seem more simple or understandable for a noob like me but i get stuck even before being able to test it...
how can i compile my helloworld please ?
thx
cya.