Minetest-C55 :: fatal error LNK1120: 15 unresolved externals

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.
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Minetest-C55 :: fatal error LNK1120: 15 unresolved externals

Post by owen_a »

Hello all.

I didn't know where to post my thread, since it was about Minetest. But I hope it is ok here since this can be a general programming error as well.

OK, basically I have downloaded Minetest from: http://celeron.55.lt/~celeron55/minetes ... -win32.zip

Website: http://celeron.55.lt/~celeron55/minetest/index

I have read the README.txt to set everything up correctly. Now, when I come to compile it everytime, I get this error when it tries and links, and make the .exe:

Code: Select all

fatal error LNK1120: 15 unresolved externals
My BuildLog is hosted on my server. You can view the buildlog by going here: http://94.170.202.56/BuildLog.htm

I am using MSVC C++ 2005, since this was the application what the minecraft.sln brought me to when I opened it.

Can anyone help me?

Thanks!

- Owen

EDIT: I have just compiled it again, and i cannot remember what i did, but i get this new error now:

Code: Select all

Linking...
LINK : fatal error LNK1104: cannot open file 'zlibwapi.lib'
EDIT: After setting the path to zlibwapi.lib I get the same 15 unresolved external errors as before.
A Social Network given to you:
http://thephoenix.dyndns.org
CuteAlien
Admin
Posts: 9693
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Unresolved externals is a linker error and means you didn't link to some needed library (or object files). But unless you show us _which_ externals are missing we can't really tell you which library that is :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

There is a link to the BuildLog: http://94.170.202.56/BuildLog.htm ;)
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

I gave you the BuildLog though. It should be at the bottom which tells you the externals.

EDIT:you beat me to it Sylence :D
A Social Network given to you:
http://thephoenix.dyndns.org
CuteAlien
Admin
Posts: 9693
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Ok, did overlook that. Not sure if that is a library, rather looks like there's a cpp-file missing in the project file. Check if those functions are in some .cpp files and if so add them to the project file.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

I don't understand :?:
A Social Network given to you:
http://thephoenix.dyndns.org
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

owen_a wrote:I don't understand :?:
He said it clearly enough..
The project has header file which has function declarations but their definitions are missing because some *.cpp file is not included into project. This could cause unresolved externals error.
Last edited by serengeor on Thu Apr 14, 2011 4:56 am, edited 1 time in total.
Working on game: Marrbles (Currently stopped).
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

Does this game compile fine for you? (i'm checking for any missing .cpp files now)
A Social Network given to you:
http://thephoenix.dyndns.org
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

owen_a wrote:Does this game compile fine for you? (i'm checking for any missing .cpp files now)
I haven't really tried to compile it, though i have downloaded the sources, but only to see how it does some things, and still didn't have much time to look at them.
Working on game: Marrbles (Currently stopped).
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

I've included alot of header file (.h) to the project which where inside the project folder and wernt in the project solution. I still get the same ammount of errors and the same external errors. Time to see if there are any .cpp files which might fix the problem.
A Social Network given to you:
http://thephoenix.dyndns.org
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

Ok. I've finished adding in all the missing Header and Source Files. Now when I added the missing source files which weren't inside of the solution to begin with, I now have 11 errors and 8 warnings.

Build Log is here: http://94.170.202.56/BuildLog.htm

I don't know if you know this, but in order to compile minetest, you have to have some third party sources. For this, I had to download zlib125dll, and zlib-1.2.5, and irrlicht-1.7.2. With all the include, library directory's inside MSVC itself.

I've ran out of ideas now. Any Ideas? :?
A Social Network given to you:
http://thephoenix.dyndns.org
CuteAlien
Admin
Posts: 9693
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

You seem to have 2 main functions now. I don't know the project at all, but I guess it uses some client/server model so you would have 2 executables. Which means you also have 2 project files. So you shouldn't have servermain and main in the same project file.

But why don't you ask the author of that project? He can probably help you faster.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

I already ave. I gave him the latest buildlog, and explained like i did in this thread. I know Celeron-55 has an account here. Should I PM him? or wait for the email I sent him? (Google Mail wise)
A Social Network given to you:
http://thephoenix.dyndns.org
CuteAlien
Admin
Posts: 9693
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Well, it's as serengeor described. Unresolved externals means that a function is declared in a header, but the corresponding function definition itself is missing. So go back to what you had originally. And this time just add the .cpp files which contain functions with exactly those names which are mentioned as unresolved externals.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
owen_a
Posts: 11
Joined: Tue Apr 12, 2011 9:27 am
Contact:

Post by owen_a »

So could the header files be causing this problem?
A Social Network given to you:
http://thephoenix.dyndns.org
Post Reply