Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualnickme

Posted 17 November 2012 - 10:43 AM

hi,

i had not used ms vs c++ for a while.
i loaded the Irrlicht engine and the first Hello world example provided by Irrlicht sdk. i included the lib and include directory paths.

i encountered the following errors:

1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Main.obj : error LNK2019: unresolved external symbol __imp__createDevice referenced in function _main
1>C:\Users\rob\C#\game engine\irrlicht-1.8\HelloWorld\Debug\HelloWorld.exe : fatal error LNK1120: 1 unresolved externals
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(275,5): error MSB6006: "link.exe" exited with code 1120.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

i must had missed something very simple but i can not figured out what.

hoping you can help me on this one.

thanks

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif
int main()
{
IrrlichtDevice *device =
createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
false, false, false, 0);
if (!device)
return 1;
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
rect<s32>(10,10,260,22), true);
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
if (!mesh)
{
device->drop();
return 1;
}
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation(scene::EMAT_STAND);
node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
}
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();

return 0;
}


#1nickme

Posted 16 November 2012 - 11:55 PM

hi,

i had not used ms vs c++ for a while.
i loaded the Irrlicht engine and the first Hello world example provided by Irrlicht sdk. i encountered the following errors:

1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Main.obj : error LNK2019: unresolved external symbol __imp__createDevice referenced in function _main
1>C:\Users\rob\C#\game engine\irrlicht-1.8\HelloWorld\Debug\HelloWorld.exe : fatal error LNK1120: 1 unresolved externals
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(275,5): error MSB6006: "link.exe" exited with code 1120.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

i must had missed something very simple but i can not figured out what.

hoping you can help me on this one.

thanks

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#ifdef _IRR_WINDOWS_
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif
int main()
{
IrrlichtDevice *device =
createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
false, false, false, 0);
if (!device)
return 1;
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
rect<s32>(10,10,260,22), true);
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
if (!mesh)
{
device->drop();
return 1;
}
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation(scene::EMAT_STAND);
node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
}
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();

return 0;
}


PARTNERS