[solved] Compile error: cannot open file 'newton.lib'

Macrobber

09-06-2006 04:24:29

Hey all,
Got an odd issue…I have installed the Newton SDK and am attempting to compile the demos for OgreNewt. However, when I compile, I get the following error:

Linking...
LINK : fatal error LNK1104: cannot open file 'newton.lib'

I did a search for newton..h on my hard drive and found newton.lib in the OgreSDK\OgreNewt directory AND the Program Files\NewtonSDK\sdk directory. I have linked to those directories, yet still get the same error. Any ideas?

Not sure if it matters, but I am attempting to compile using Visual Express.

posixninja

09-06-2006 09:14:02

that lines says you're not linking to them properly, try again. try adding c:\Program Files\NewtonSDK\sdk\dll to the additional library directories.

Macrobber

09-06-2006 16:45:29

Hrm...I know this is just something stupid that I am doing...but I I have that directory linked under the additional library directories already...I even reinstalled both OgreNewt and NewtonSDK...I know I am going to kick myself whenever I figure out why this isn't working.

danharibo

09-06-2006 20:48:10

dont include more than onenewton ib

Macrobber

09-06-2006 21:17:52

Man this is frustrating...I am only including the one directory NewtonSDK\sdk but it still fails on the same line. Let me ask a stupid question. Do you have to build Newton? I assumed that since it was an SDK, the install would take care of all the lib files. I am getting despirate here :(

Some more information that may help...OgreNewt_Main is compiling fine - it is just when I attempt to complie Demo01_TheBasics that the link fails. I know that OgreNewt_Main is a dependancy, so when I complie TheBasics - it first complies OgreNewt_Main (which as I said compiles fine). Here is part of the build log:

OgreNewt_Main - 0 error(s), 4 warning(s)
------ Build started: Project: Demo01_TheBasics, Configuration: Release Win32 ------
Compiling...
OgreNewtonFrameListener.cpp
OgreNewtonApplication.cpp
demo01.cpp
Generating Code...
Linking...
LINK : fatal error LNK1181: cannot open input file 'newton.lib'
Build log was saved at "file://c:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\Build\Release\BuildLog.htm"
Demo01_TheBasics - 1 error(s), 0 warning(s)
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

walaber

10-06-2006 00:31:01

OgreNewt_Main is a static library, so there is no linking... so it doesn't care it it can't find newton.lib, as long as it can find newton.h.

Macrobber

10-06-2006 00:53:02

Ok...I managed to move a ton of library files and dll's into my ogrenewton workspace and got it to compile (Yeah)...However, now when I attempt to execute it in Release mode, I get:

'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\bin\release\Demo01_TheBasics.exe', Symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\Newton.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\OgreMain.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\zlib1.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\DevIL.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcr80.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\ILU.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcp80.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\OgrePlatform.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\dinput8.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
First-chance exception at 0x7c81eb33 in Demo01_TheBasics.exe: Microsoft C++ exception: Ogre::Exception at memory location 0x0012fb8c..
First-chance exception at 0x7c81eb33 in Demo01_TheBasics.exe: Microsoft C++ exception: Ogre::Exception at memory location 0x0012fca8..
'Demo01_TheBasics.exe': Unloaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\OgrePlatform.dll'
'Demo01_TheBasics.exe': Unloaded 'C:\WINDOWS\system32\dinput8.dll'
'Demo01_TheBasics.exe': Unloaded 'C:\WINDOWS\system32\advapi32.dll'
'Demo01_TheBasics.exe': Unloaded 'C:\WINDOWS\system32\rpcrt4.dll'
The program '[1208] Demo01_TheBasics.exe: Native' has exited with code 0 (0x0).

If I try to run it in debug mode, I get:

'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\bin\debug\Demo01_TheBasics.exe', Symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\Newton.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\OgreMain_d.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\zlib1.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\DevIL.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcr80.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\OgreSDK\ogrenewt\demos\Demo01_TheBasics\ILU.dll', Binary was not built with debug information.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', No symbols loaded.
'Demo01_TheBasics.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', No symbols loaded.
First-chance exception at 0x7c81eb33 in Demo01_TheBasics.exe: Microsoft C++ exception: Ogre::Exception at memory location 0x0012f0dc..
The program '[3440] Demo01_TheBasics.exe: Native' has exited with code 0 (0x0).

This is becoming painful :( Has anyone else had any issues compiling OgreNewt with Visual Express 8?

walaber

10-06-2006 03:50:34

I use VC8 exclusively, with no problems... but I compile Ogre from the source, not the SDK... which means the default directories in the demos will not work for you...

Macrobber

10-06-2006 04:00:56

Ah...maybe that is the problem...I used the Ogre SDK. Guess I will get the ogre source and give that a try...

walaber

10-06-2006 05:32:30

it just means you will have to either edit the project files, or add a global "linker directory" that points to newton.lib...

Macrobber

11-06-2006 21:27:48

Building from souce solved the problem. Thanks for the help Walaber...