473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem with linker

When I go to compile a project I see this error

[Linker error] undefined reference to
`_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_T YPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventRec eiverEPKw'

someone knows how can I do for delete this error???
Thanks

Nov 23 '05 #1
6 2461
Sampei120 wrote:
When I go to compile a project I see this error

[Linker error] undefined reference to
`_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_T YPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventRec eiverEPKw'

someone knows how can I do for delete this error???
Thanks


You are missing a function possibly with the name createDevice. Perhaps
the function is just not found by the linker (did you include all the
correct files?), perhaps the parameter types differ between the
prototype/class declaration and the implementation, perhaps the
constness of the function is different. There could be any number of
problems, but we'd need to see some code to figure out what is the
cause of the error.

Cheers! --M

Nov 23 '05 #2
Sampei120 wrote:
When I go to compile a project I see this error

[Linker error] undefined reference to
`_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_T YPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventRec eiverEPKw'

someone knows how can I do for delete this error???


You need to tell your linker where to find that function. If it is your
function, and you forgot to define it, you need to define it somewhere.

V
Nov 23 '05 #3

mlimber wrote:
You are missing a function possibly with the name createDevice. Perhaps
the function is just not found by the linker (did you include all the
correct files?), perhaps the parameter types differ between the
prototype/class declaration and the implementation, perhaps the
constness of the function is different. There could be any number of
problems, but we'd need to see some code to figure out what is the
cause of the error.

Cheers! --M

Thank you! This is the code...

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io; // Serve per I/O
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")

int main()
{
// Creation of device
IrrlichtDevice *device = createDevice(EDT_DIRECTX8,
dimension2d<s32>(640,480),
// ERROR
16,false,false,false,0);

// Creatio scene manager e GUI
IVideoDriver* driver = device->getVideoDriver();
IGUIEnvironment* guienv = device->getGUIEnvironment();
ISceneManager* smgr=device->getSceneManager();

// Screen
device->setWindowCaption(L"Irrlicht 1.1");
guienv->addStaticText(L"Ciao Mondo!", rect<int>(10, 10, 70, 22), false,
true,
0, -1, true);

// mesh 3D
IAnimatedMesh* mesh = smgr->getMesh("earth.x");

// Apply the mesh
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);
node->setScale(vector3df(40.0,40.0,40.0));

// Light
smgr->addLightSceneNode(0, vector3df(0,100,-200),
SColor(0,200,200,200), 10000.0f,-1);

// Static Camera
smgr->addCameraSceneNode(0, vector3df(0,70,-100),
vector3df(0,10,0));

// Scene
while (device->run())
{
driver->beginScene(true, true, SColor(0,0,0,0));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}

// risource
device->drop();
return 0;
}

but I don't miss the function... I think...

Nov 23 '05 #4
Sampei120 wrote:
mlimber wrote:
You are missing a function possibly with the name createDevice. Perhaps
the function is just not found by the linker (did you include all the
correct files?), perhaps the parameter types differ between the
prototype/class declaration and the implementation, perhaps the
constness of the function is different. There could be any number of
problems, but we'd need to see some code to figure out what is the
cause of the error.

Cheers! --M
Thank you! This is the code...

#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io; // Serve per I/O
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")


Is this library being linked with your project when you compile and link it?
int main()
{
// Creation of device
IrrlichtDevice *device = createDevice(EDT_DIRECTX8, dimension2d<s32>(640,480),


Here you call a function, that is not defined in the sources you show,
so presumably you must link with the library mentioned above.

Ben Pope
Nov 23 '05 #5
Ed
Did you check that your lib file "Irrlicht.lib" is in your default lib
path? If not, I would try adding the path to that library in your
pragma.

#pragma comment(lib, "somepath/Irrlicht.lib")

Ed

Nov 23 '05 #6
Sampei120 wrote:
When I go to compile a project I see this error

[Linker error] undefined reference to
`_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_T YPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventRec eiverEPKw'

someone knows how can I do for delete this error???
Thanks


Sometimes, the order of the linked libraries makes a difference when the
linker should find what is needed...

Regards,
Peter Jansson
Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Georg | last post by:
Hello, I must be doing something wrong, but I don't get it: - compile gcc -c -O -Iinc src/hello.c -o obj/hello.o gcc -c -O -Iinc src/msg_1.c -o obj/msg_1.o gcc -c -O -Iinc src/msg_2.c -o...
2
by: Joske | last post by:
Hi, I'm having a similar problem as Scott. A static library with managed C++ functions fails to link in. See http://groups.google.be/groups?q=managed+C%2B%...
3
by: Eric W | last post by:
MS VC++ 7.1 - I have a project with static libs A, B and C where A depends on B anc C, also B depends on C. If I set this up in the project dependency dialog for A the Build environment puts B...
4
by: Erik Leunissen | last post by:
Hello all, I want to distribute a shared library (lets call it "parent.so"), which, in turn, is used to create shared libs by invoking the GNU linker (lets call these shared libs "child.so"). ...
6
by: John | last post by:
I have 5 native static libraries that are being compiled in Visual Studio 2005 with the /MDd C Runtime option. I have 2 CLR DLLs (all managed code) in Visual Studio 2005 and the /MDd C Runtime...
3
by: michael | last post by:
Hi All, Not sure if this is a c++ issue or a compiler issue. I have the following in a class: template<class T> bool Utility::getInput(T& i, T low, T up){ bool result = false; if(cin >i){
11
by: ZMY | last post by:
Dear all, I am a real newbie for both python and QNX, but I am still trying to compile Numeric-24.2 under QNX4.25 with python 2.2. I got following error message: $ sudo python setup.py...
1
by: Deepath G | last post by:
This is deepath.. I am getting some linker error when i am trying to connect Websphere MQ using Borland C++ Builder 2006 using imqi.hpp on windows. Error Message ----------------------- ...
0
by: DevEng | last post by:
Hi all, I am new to Python and trying to embed it into a c/c++ application. I started with examples from the documentation pages and go to the Pure Embedding example...
6
by: vaib | last post by:
hi all , i am facing a funny problem in C . i am using turbo's compiler - the 16 bit compiler for dos . i made a file maximum.h which contains a function declaration , and includes files such as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.