Irrlicht:ms vs c++ 2010 error LNK 2019 and 1120

Started by
1 comment, last by yewbie 11 years, 4 months ago
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();
[indent=1]return 0;
}
Advertisement
Please use source tags. It's the little red bracket icon on the end of the second row of editor icons.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
Look at about 1 minute into this video:


You need to put in paths for Libraries and addtional includes.

This topic is closed to new replies.

Advertisement