scratchpad
hardburn
<p>Trying to compile a program on Win32. The MS compiler suite (free version) is at "E:\Program Files\Microsoft Visual C++ Toolkit 2003", and the MS SDK is at "E:\Program Files\Microsoft Platform SDK". ActiveState Perl 5.8.4 is at "E:\Perl".</p>
<p>Compile goes fine, but link gives error:</p>
<code>
link @"src\My\Games\Azure.lds" -out:"blib\arch\auto\My\Games\Azure\Azure.dll"
Creating library blib\arch\auto\My\Games\Azure\Azure.lib and object blib\arch\auto\My\Games\Azure\Azure.exp
Azure.obj : error LNK2019: unresolved external symbol _abs referenced in function _rects_collide
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
blib\arch\auto\My\Games\Azure\Azure.dll : fatal error LNK1120: 2 unresolved externals
</code>
<p>The "msvcrt.lib" file does not appear in the SDK under "lib\", but it is under "lib\AMD64" Shouldn't there be a non-AMD64 version? I'm running on an AMD64, but I need to make this program work on IA32 archs. Will linking to the AMD64 version cause problems there?</p>
<p>Relevent environment vars:</p>
<code>
echo %PATH%
E:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;E:\Perl\bin;e:\Perl\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
echo %LIB%
E:\Program Files\Microsoft Platform SDK\Lib\AMD64;E:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;E:\Program Files\Microsoft Platform SDK\Lib;E:\Perl\bin;E:\Perl\lib;
echo %INCLUDE%
E:\Program Files\Microsoft Visual C++ Toolkit 2003\include;E:\Program Files\Microsoft Platform SDK\Include;E:\Perl\lib\CORE;
</code>
<p>I'm not sure what other libraries I need to get this to work correctly.</p>