Compiling Problem and LNK errors

Problems building or running the engine, queries about how to use features etc.
Post Reply
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Compiling Problem and LNK errors

Post by Archydraw »

Archydraw"]Hello Ogre Community,

Just recently downloaded the SDK`s and the STLport files needed, ive been following the wiki tutorials for setting up and compiling. Ive come across this same problem now for both the SDK 6 and 7 and really in need of posting this question after many hours of ritual circles of something it thought id be able to work out but ive added all linkages, paths and Visual Studio items to the Project and "Cannot" get a compile of any of the samples yet :(.

I think my problem may lie with the StlPort but im not sure as ive tried all the SDK`s now (bar 7.1) and all dependencies i think are correctly installed (as ive read)

In this "HELP" thread http://www.ogre3d.org/phpBB2/viewtopic.php?t=3895


:arrow: In this command prompt, type c:\Path\To\DevStudio\VC98\bin\vcvars32.bat (for VC6) or c:\Path\To\VisualStudio.Net\VC7\bin\vcvars32.bat (for VC7)
? Im not quite with that, as it doesnt seem to work or relative to the dos type command ?. Is here something im missing here or is it supposed to read Path = ? blah. So obviously without the above steps taken i think this is where my problems is ? so in need of some assistance please.

If i bypass the above and try to compile i get the following errors LNK2019 which is the exact error for which the Help thread is talking about so i hope you can see my problem here and looking forward to any help and replies.
Last edited by Archydraw on Sun Feb 27, 2005 3:17 am, edited 3 times in total.
Archy Draw
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Re: Compiling Problem and LNK errors

Post by Archydraw »

Edited - Dbl Post - sry
Archy Draw
Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes »

Alright, your problem is very easy to fix if you are getting these same link errors.

In Visual Studio, right click your project and select properties. I don't remember how VC6 is layed out but in VC7.1, under C/C++->Code Generation->Runtime Library you can specify Multi-threaded (Debug) DLL. Find where that is and switch it and you'll be home free!
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

Ah ! Lodes Thx, 1 step further :) but another error.

I`m trying to compile the Demo_Terrain.exe

Compiling...
Terrain.cpp
Linking...
stlport_vc7_static.lib(dll_main.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(fstream.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(ios.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(streambuf.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(stdio_streambuf.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(iostream.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(codecvt.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(collate.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(ctype.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(monetary.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(num_get.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(num_put.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(num_get_float.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(num_put_float.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(numpunct.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(time_facets.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(messages.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(locale_impl.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info
stlport_vc7_static.lib(c_locale.obj) : warning LNK4099: PDB 'vc70.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\lib\stlport_vc7_static.lib' or at 'c:\OgreTutorials\OgreNew\bin\Debug\vc70.pdb'; linking object as if no debug info

Build log was saved at "file://c:\OgreTutorials\OgreNew\samples\obj\Debug\BuildLog.htm"
Demo_Terrain - 0 error(s), 19 warning(s)


---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped

Any help much appreciated.

When i try to Run the Demo_Terrain.exe it gives me a DLL Error MSVCP60D.Dll missing ?
Archy Draw
Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes »

Alright so you are compiling with msvc6 I take it. This is very strange that it can't find MSVCP60D.DLL. Search for it (using windows search) in your visual studio directory. You can also probably find that dll on the web. Then put it in either C:\Windows or in the same directory as your exe.

Very strange that you're getting this.
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

Hi again,

Well, i found a dll, Then another dll and so on, this continued for about 4 or 5 files, ended up with the compiled demo_terrain.exe, tried to run it, it just hung around abit then Crashed out.

In the above post, i posted 19 warning(s) all pointing at Studio .NET\Vc7\lib\stlport_vc7_static.lib' ? can you explain those please or is that something i should need to worry about as you mentioned about just finding the dll.

I`m hoping, to Load up the Source for the Demo_Terrain, compile it and run it with no erorrs, so im not sure if i should be compiling it all ? batch build or just comile and set my Paths, etc for the stlport in "each" project setting as i dont seem to find 1 for setting all the 26 solution samples up.

Late night here which im sure ill be having many more of and ill be happy to find any help and assistance for when i open my eyeballs in the morning :). Thx.
Archy Draw
Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes »

I don't believe the warnings are anything to be worried about. The version of stlport that you have was compiled with VC7, and because of that you won't be able to debug inside the stlport library. That's usually not a problem. It's actually kinda strange that it lets you use it under vc6 but since it appears to work, I don't think there's anything to worry about.

There's supposed to be only one version of mMSVCP60D.dll It really should be ony your computer since well you're using vc6. Find it and put it in your directory with the exe file or C:\Windows.

It's kinda weird that it crashes just like that. You might want to look at the Ogre.log file which has hopefully been created.

If you are having so many problems, it might be good to just download the precompiled sdk for vc6 at first to work it all out. Ogre isn't supposed to take this long to get set up.
User avatar
neocryptek
Gnome
Posts: 335
Joined: Sat Mar 01, 2003 11:21 pm
Location: Idaho, USA
Contact:

Post by neocryptek »

Is the coresponding stlport dll in the same directory as your exe? In my experience when it just runs and does nothing [kill via taskmanager] it was missing the stlport dll.

-N30
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

Thx chaps,

Fresh head today, so, from your replies above about the stlport errors ill keep that in mind, the wierd thing is the dll missing "as you said" Ogre shouldnt take that long to setup" so im sure its something (pre) installed maybe on my Visual Studio which is causing this problem.

I`m going todo a clean install now and see what happens, iI`d like to thank you all so far for your help, you have been very helpful indeed. I`ll keep you updated on my workings and hope it gets iron`d out.

Thx
Archy Draw
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

++Clean Install

Fresh install of OgreSDKSetup1.0.0_VC6.exe
Fresh install of OGRESTLport-4.6.2.exe
Set Additional Includes Folder in Visual Studio C:\STLport-4.6.2\stlport

All went smoothly, opened up the "Samples.dsw" selected the Demo_Terrain>Build>

++On Compile it seemed to go ok, no errors and no warnings as you can see below (chuffed) :)

Demo_Terrain - 0 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped

++Running Demo_Terrain.exe

As soon as i try to run the Demo_Terrain.exe i get the *.dll error
---------------------------
Demo_Terrain.exe - Unable To Locate Component
---------------------------
This application has failed to start because MSVCP60D.dll was not found. Re-installing the application may fix this problem.

So problem is still this dll, ive searched my pc and no references are found, i tried a support kit i found floating on the net with this dll in it, yet to no avail, with this dll and other dlls it refers to i just still get the "Crash", hangs then crashes. and the log contains 0bytes so nothing to go from there.

I also tried to put the coresponding stlport dll in the same directory as my exe and still the same.

mmmm any help always appreciated.

++EDIT

After finding those Dll`s and moving around a little i get to this stage ?

---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!

Program: C:\OgreTutorials\OgreSDK\bin\debug\Demo_Terrain.exe
File: dbgheap.c
Line: 1017

Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
Archy Draw
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

++Update :)

Just to let you all know, I can now "Release" compile this ith no errors or warnings, and my executable works fine :), so i can go ahead and start work on something and learn a little on the Ogre frontier, However...

With "Debug" compile, it still gives these errors and i was assuming i should clear these up ? if so any help still and always apreciated.

Thx
Archy Draw
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

This application has failed to start because MSVCP60D.dll was not found. Re-installing the application may fix this problem.
This means you've somehow managed to install VC6 but not MSVCP60D.dll, which is the VC6 C++ debug runtime dll. This should be impossible, so it suggests that you've either not installed VC6 correctly, or you've removed this file, or you've somehow lost some files since you installed VC6.
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

Thx Sinbad.

Another up here which should "nearly" round off this post as its now going in other directions i think.

As mentioned above i can "100% compile in Release Mode" but still when i try to compile with "Debug" the system just hangs, the error signature which shows is " ModName: msvcrtd.dll" so maybe something for my debug is still causing problems.

All fine with release though and Many Thx to you all as its been of great help to me considering the depths i thought i was at originally, id like to get to the bottom of this error as it seems a little strange, as you all say it should be fine and after my reading through the forums and tutorials etc seems like the procedures ive taken have taken effect as ie had no specific errors pop up apart from this lata one now.

On a sidenote, part of my original question was related to the StlPort for which im still not sure is setup properly (or is it ? considering i can compile on release). The "Tutorial" steps for the Help thread :


:arrow: In this command prompt, type c:\Path\To\DevStudio\VC98\bin\vcvars32.bat (for VC6) or c:\Path\To\VisualStudio.Net\VC7\bin\vcvars32.bat (for VC7)
? Is that valid ? as when i goto my Stlport cmd path and type it with my relative path it doesnt recognise it (which seems correct) My Location is "C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\vcvars32.bat" and still unsure on those steps ?

Maybe this is why my Debug wont compile and run without errors.
Archy Draw
Lodes
Google Summer of Code Student
Google Summer of Code Student
Posts: 228
Joined: Mon Mar 17, 2003 12:02 am
Location: San Jose, CA, USA

Post by Lodes »

I am completely confused. Are you using vc 6 or vc 7. And if you've got vc7 why don't you use vc7 instead of vc6?

Other than that, just use your location.. which is what you're supposed to type.

If you have vc7 download the vc7 dependencies and work with that.. don't worry about the vc6 dependencies. and the vc6 compiler.
Archydraw
Gnoblar
Posts: 9
Joined: Sat Feb 26, 2005 8:15 pm

Post by Archydraw »

mmm, good question Lodes. I think ive been trying that many different things the last day or so ive probably confused myself into what version ive been running, I`ll fire up the VC7`s and see what happens.

Cheers again chaps, great help all of you.
Archy Draw
Post Reply