• Advertisement
Sign in to follow this  

Link Error

This topic is 4261 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
You'll need AS built prior to compiling the tutorial. And alternatively, may need to direct your linker to the angelscript.lib file.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
But... where to get winmm.lib? I know it is a windows api, but where is the static version of it?

Thanks

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement