Advertisement

Link Error

Started by May 08, 2006 01:59 PM
5 comments, last by DvDmanDT 18 years, 6 months ago
Hi anybody! When i try to compile as tutorial project, i get this: ------ Build started: Project: msvc8, Configuration: Release Win32 ------ Compiling... scriptstring.cpp main.cpp ..\..\source\main.cpp(23) : warning C4996: 'getch' was declared deprecated e:\Archivos de programa\Microsoft Visual Studio 8\VC\include\conio.h(145) : see declaration of 'getch' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.' ..\..\source\main.cpp(187) : warning C4996: 'fopen' was declared deprecated e:\Archivos de programa\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen' Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.' ..\..\source\main.cpp(205) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data Linking... main.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0 main.obj : error LNK2001: unresolved external symbol _asCreateScriptEngine scriptstring.obj : error LNK2001: unresolved external symbol _asGetActiveContext E:\ogre\AngelScript\samples\tutorial\projects\msvc8\Release\msvc8.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://e:\ogre\AngelScript\samples\tutorial\projects\msvc8\Release\BuildLog.htm" msvc8 - 4 error(s), 3 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== How can i fix it? P/D: I'm using VC++ 2005 Pro Thanks for answer me. Bye!
You'll need AS built prior to compiling the tutorial. And alternatively, may need to direct your linker to the angelscript.lib file.
Advertisement
You can also just drop the source into your project. This ensures you don't have any nasty incompatibilities like linking with different run time libraries are statically linking with the same library twice.
You can safely ignore the warnings.

The other problems are because you need to link with a couple of libraries, namely: winmm.lib for timeGetTime(), and angelscript.lib for asCreateScriptEngine() and asGetActiveContext().

Of course, you'll get angelscript.lib by compiling the library project (or doing what Deyja said).

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

But... where to get winmm.lib? I know it is a windows api, but where is the static version of it?

Thanks
winmm.lib should be included with your version of MSVC++, and its location is probably already configured. You should only have to add the library to the linker settings.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
Unless you use the express version, in that case you'll have to download The Platform SDK and configure VC to use it.. There's a guide for it somewhere on msdn (where you download it)..

This topic is closed to new replies.

Advertisement