Sign in to follow this  
Winterborne

error LNK2019 & fatal error LNK1120 - SOLVED!

Recommended Posts

Winterborne    122
Okay. Just a quick background. I'm in school currently for game design. My strongest coding knowledge lays with VB, and that is pretty weak in itself. So please, when answering try to use simple terms? ^^; (be gentle, i'm still learning) Problem Info (enough about me) I have only added two lines of code to a demo file brought in from the Ogre SDK folder. At first, I had the error where it couldn't find windows.h. I fixed that by installing Platform SDK and ended up having to move the bin, include, and lib folders from there into the Virtual Studio directory. Here's the full error I'm getting now. I have cleaned and rebuilt the file ----------------- 1>Linking... 1>Terrain.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function __catch$_WinMain@16$0 1>..\..\bin\Debug/Demo_Terrain.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://c:\OgreSDK\samples\obj\Debug\BuildLog.htm" 1>Demo_Terrain - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ----------------- Please help if able. I'm already behind. If I can't get it fixed I'll have to wait till next week and I'll be even more behind. Thanks! [Edited by - Winterborne on March 25, 2008 10:05:46 AM]

Share this post


Link to post
Share on other sites
Dunge    405
Usually you would let the platform sdk where it's installed by default and set the path in Visual Studio under tools > options > project and solution > vc++ directories for both include and lib files. Then, if the paths are ok it should find windows.h and the necessary lib files for the messagebox function.

Note that for me the platform sdk went automatically under
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK
and added the paths correctly in the settings by itself. I wonder what you did with yours..

And I don't think there's any msgbox.lib...

Share this post


Link to post
Share on other sites
Winterborne    122
I just let it install where it did as a default. The place where yours is is where those files are now, i just had to create it. I have 2005 Express and I found the fix to do it like that on the msdn webside, which i might add had been useless up until that point.

I've noticed that a lot of people have problems with Express versions, and i would get the real version if I weren't a poor, broke student. XD So until I get a job that pays more than what I have (preferably in my field) then I just have to make do with what I have.

Share this post


Link to post
Share on other sites
MaulingMonkey    1728
The remaining instructions here should fix your problem, or if you upgrade to 2008 Express, which (at least for the web installer version) Microsoft was smart enough to include the platform SDK into.

It's not named msgbox.lib, but it should be one of the libraries you deal with in Step 4 of those linked instructions, which should fix your problem.

Share this post


Link to post
Share on other sites
Winterborne    122
Thanks for the help. I'd upgrade, but unfortunately, Ogre SDK hasn't made a compatible version. ^^;

EDIT: OMG! it worked! so far anyway, now to fix the other problems i have elsewhere lol! Thanks!

[Edited by - Winterborne on March 25, 2008 10:17:14 AM]

Share this post


Link to post
Share on other sites

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