Sign in to follow this  

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

This topic is 1883 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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;
}[/indent] Edited by nickme

Share this post


Link to post
Share on other sites
Look at about 1 minute into this video:
http://www.youtube.com/watch?v=BsIMqFIi3II

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

Share this post


Link to post
Share on other sites

This topic is 1883 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this