Windows 64

Casper Færgemand" <shorttail at hotmail.com> Casper Færgemand" <shorttail at hotmail.com>
Sun Oct 6 18:31:32 PDT 2013


Hey, I've been trying for a while to compile 64 bit programs on a 
Windows 7 platform. The setup is the following:

Version: 2.063.2
OS: Windows 7 64
Linked: VS 11 64 bit linker

sc.ini:

[Version]
version=7.51 Build 020

[Environment]
LIB="%@P%\..\lib";\dm\lib
DFLAGS="-I%@P%\..\..\src\phobos" 
"-I%@P%\..\..\src\druntime\import"
LINKCMD=%@P%\link.exe
LINKCMD64=%VCINSTALLDIR%\bin\amd64\link.exe
VCINSTALLDIR=%VCINSTALLDIR%
WindowsSdkDir=%WindowsSdkDir%


Environment variables are as follows:

VCINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\
WindowsSdkDir: C:\Program Files (x86)\Microsoft 
SDKs\Windows\v7.0A\

(I had initially forgot a \ at the end of the environment 
variables)

On compiling the program "void main() {}" with -m64 -v in Eclipse 
with DDT (same result for command line), I get this thrown back:


--------  Build Commands:  --------
-od"bin"
-of"bin\temp.exe"

-I"src"

"src\temp.d"

-m64 -v

binary    C:\D\Tools\dmd2\windows\bin\dmd.exe
version   v2.063.2
config    C:\D\Tools\dmd2\windows\bin\sc.ini
parse     temp
importall temp
import    
object	(C:\D\Tools\dmd2\windows\bin\..\..\src\druntime\import\object.di)
semantic  temp
entry     main      	src\temp.d
semantic2 temp
semantic3 temp
code      temp
function  D main
C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\bin\amd64\link.exe /NOLOGO "bin\temp" /OUT:"bin\temp.exe" 
  "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\lib\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft 
SDKs\Windows\v7.0A\lib\x64"
C:\D\Tools\dmd2\windows\bin\..\lib\shell32.lib : warning LNK4003: 
invalid library format; library ignored
C:\D\Tools\dmd2\windows\bin\..\lib\kernel32.lib : warning 
LNK4003: invalid library format; library ignored
C:\D\Tools\dmd2\windows\bin\..\lib\shell32.lib : warning LNK4003: 
invalid library format; library ignored
C:\D\Tools\dmd2\windows\bin\..\lib\kernel32.lib : warning 
LNK4003: invalid library format; library ignored
phobos64.lib(dmain2_480_47b.obj) : error LNK2019: unresolved 
external symbol IsDebuggerPresent referenced in function 
_d_run_main
LIBCMT.lib(a_map.obj) : error LNK2001: unresolved external symbol 
__imp_WideCharToMultiByte

...

bin\temp.exe : fatal error LNK1120: 103 unresolved externals
--- errorlevel 1120


I took the liberty of removing the mid section, since everything 
was LIBCMT.lib and phobos64.lib things that were unresolved. Any 
heads up on what I need to tinker with?


More information about the Digitalmars-d-learn mailing list