LNK2019 error

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
Yustme
Posts: 107
Joined: Sat Dec 01, 2007 10:50 pm

LNK2019 error

Post by Yustme »

Hi,

I'm trying to use the ode physics engine in my game project.

When i include the ode.lib its generating this error:

fatal error LNK1104: cannot open file 'LIBC.lib'.

But if I put this libc.lib in the ignore list of libraries in my IDE, then i get this error:

unresolved external symbol __iob referenced in function "void __cdecl printMessage(int,char const *,char const *,char *)" (?printMessage@@YAXHPBD0PAD@Z)

Which is pointing to the ode.lib file.

I have been trying almost everything the whole day.

After googling the lnk2019 error, i bumped on this page:

http://forum.thegamecreators.com/?m=for ... 62870&b=20

The last post someone is suggesting doing a clean install of everything. Thats madness.

I am using visual studio 2005 with the latest patches, ode 0.9 and irrlicht 1.4.

Anyone any idea's how to fix either of these errors?

Thanks in advance!
ultran00b
Posts: 35
Joined: Tue Oct 30, 2007 3:30 pm

Post by ultran00b »

Why did you put libc.lib in your ignore list? Include BOTH ode.lib AND libc.lib and see what happens.
Use the debugger, young Skywalker...
Yustme
Posts: 107
Joined: Sat Dec 01, 2007 10:50 pm

Post by Yustme »

Hi,

At this page:

http://forums.microsoft.com/MSDN/ShowPo ... 2&SiteID=1

Someone suggests to put the libc.lib in the ignore list.

That did the trick in my previous game project.

Now I added a fake libc.lib in my game project.

It's still generating this error:

error LNK2019: unresolved external symbol __iob referenced in function "void __cdecl printMessage(int,char const *,char const *,char *)" (?printMessage@@YAXHPBD0PAD@Z)

And its pointing to ode.lib.
Yustme
Posts: 107
Joined: Sat Dec 01, 2007 10:50 pm

Post by Yustme »

Hi,

I found a solution to this error:

error LNK2019: unresolved external symbol __iob referenced in function "void __cdecl printMessage(int,char const *,char const *,char *)" (?printMessage@@YAXHPBD0PAD@Z)

Download ode-win32-0.9.zip from this site:

http://sourceforge.net/project/showfile ... p_id=24884

Extract the zip and go to this path:

ode-win32-0.9\ode-0.9\lib\debugdll

Copy the ode.lib from debugdll to your project's solution.

Suppose you use visual studio 2005 and your project is called "Gaming".

Then this would be the path to include the ode.lib:

My Documents\Visual Studio 2005\Projects\Gaming\Gaming

It might complain about LIBC.lib. If so, go to this site:

http://www.taekwondo.org.il/system/glutvc2005.html

Download "freeglut_static.lib" and rename it to LIBC.lib and copy that file to your project's solution.

In our example that would be this path:

My Documents\Visual Studio 2005\Projects\Gaming\Gaming
Post Reply