Link problems.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Link problems.

Post by L_Draven »

Hi guys, first congrats to BlindSide for XEffexts , its something amazing.

I am trying to move my game (in development) to Irrlicht: this is the url

http://ldravenblog.blogspot.com


And i was trying to test in my project adding the h and cpp files but when i compile i have 4 errors.

Exactly like this:

libcpd.lib(xdebug.obj)||error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)|

libcpd.lib(_tolower.obj)||error LNK2001: unresolved external symbol __malloc_dbg|

libcpd.lib(xdebug.obj)||error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void
*,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)|

Legends of Idhuriel.exe||fatal error LNK1120: 2 unresolved externals|
||=== Build finished: 4 errors, 32 warnings ===|


Sorry i am new with irrlicht and i was searching solutions but i can not find Sad.

Thanks in advance.

Cheers.
Last edited by L_Draven on Wed Oct 15, 2008 10:06 pm, edited 1 time in total.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Thanks for your comments.

I'm afraid this seems unrelated to XEffects, you are forgetting to link some kind of important library. However, it is unrelated so I cannot help you. I recommend to change the name of the thread to something more general like "Irrlicht linking problem" to get more help.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Thanks for your answer BlindSide, i supposed that the error comes from XEffects because i only have it when include "effectWrapper.h" to the code and add this:

effectHandler* effect = new effectHandler(device, shadowDimen, "./shaders", ScreenRTT);

with this error :

main.obj||error LNK2019: unresolved external symbol "public: __thiscall effectHandler::effectHandler(class irr::IrrlichtDevice *,class irr::core::dimension2d<int>,class irr::core::string<char,class irr::core::irrAllocator<char> >,class irr::core::dimension2d<int>)" (??0effectHandler@@QAE@PAVIrrlichtDevice@irr@@V?$dimension2d@H@core@2@V?$string@DV?$irrAllocator@D@core@irr@@@42@1@Z) referenced in function _main|


Then i add the "effectWrapper.h", effectWrapper.cpp", and "CShaderPre.cpp" to my project in CodeBlocks and its when i have the errors of the first post that i wrote.

if i remove it, the project works perfect.


Anyway if you think that is not a problem from XEffects i will change the name of the post without problems.

Thanks.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Compile looks OK, because it was able to generate the obj file.

But the linkage is broken, you don't know where the .o files are. So the linker is telling you the symbol is unresolved external.

By the way, I suggest you take a Programming Language (Compiler) 101 class at a local community college. These things aren't free, you will be required to learn these things inside a classroom.

You can try Googling the Dragon Book by Sethi, Aho, Etc.
Image
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Why pay money for courses when you can just learn through books, teach yourself, and share knowledge along the way with others to further better yourself and the community.

Those courses are a waste of your time, and generally teach very bad practices. Go with a book that teaches the language, not the practice, and pick up the practice from real world examples.

And for learning how to use a compiler, you can always use MSDN, by searching for a specific error, or search string. If that doesn't give enough of an answer, then you can always go to forums like GameDev or DevMaster, and post about your problems in the General Programming section.
TheQuestion = 2B || !2B
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Thanks for the answers.

Anyway, i changed the title of the post.

Cheers.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

BlindSide wrote:Thanks for your comments.

I'm afraid this seems unrelated to XEffects, you are forgetting to link some kind of important library. However, it is unrelated so I cannot help you. I recommend to change the name of the thread to something more general like "Irrlicht linking problem" to get more help.

Cheers
Hey, that's not good enough. Come back here. Taal heena, sadeeek.

Give him a good answer, please.
Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

It is a linking problem with OpenGL and MSVC, maybe it only comes up when using shaders?

A quick google for "libcpd" provided these relevant results:

http://www.codeguru.com/forum/showthread.php?t=414093
http://newsgroups.derkeiler.com/Archive ... 00254.html

I'm seriously not familiar with the issue but possibly hybrid or the other Irrlicht devs have encountered it.

Cheers

EDIT: Furthermore, go into project options -> c++ -> code generation and change the runtime to Multi Threaded DLL if it is not already set to this.

Heres a note from the second thread:

"Note. Starting in Visual C++ 2005, LIBCP.LIB and LIBCPD.LIB (via the
old /ML and /MLd options) have been removed. Use LIBCPMT.LIB and
LIBCPMTD.LIB instead via the /MT and /MTd options."
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
L_Draven
Posts: 21
Joined: Sun Mar 07, 2004 11:36 am

Post by L_Draven »

Thanks a million for your help BlindSide.

When i´ll go home i will check it and i will told you the results. :-)


Thanks again Blind.


Cheers.
Post Reply