www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - yet another VisualD linker error

reply "Palmic" <mpalomas live.fr> writes:
Hi,

Like a lot of people I'm a bit struggling with VisualD since I 
can't get the linker working.

My configuration:

Windows 8.1 x64, Visual Studio 2013.

So yes it means I have Windows 8.1 SDK, and the values commented 
in sc.ini are wrong. Therefore I changed only the following to:

VCINSTALLDIR=D:\software\vs2013\VC
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1
LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe
; needed with /DEBUG to find mspdb*.dll (only for VS2012 or 
VS2013)
PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE
; Platform libraries (Windows SDK 8.1)
LIB=%LIB%;"%WindowsSdkDir%\Lib\winv6.3\um\x64"


Still I can't link my basic Win32 API simple program. Here is the 
build log html:

Command Line
set PATH=D:\dev\dmd2\windows\\bin;C:\Program Files 
(x86)\Microsoft SDKs\Windows\v7.0A\\\bin;%PATH%
set DMD_LIB=D:\software\vs2013\VC\\lib\amd64
set WindowsSdkDir=C:\Program Files (x86)\Microsoft 
SDKs\Windows\v7.0A\
set VCINSTALLDIR=D:\software\vs2013\VC\
dmd -m64 -g -debug -X -Xf"Debug\WindowsApp1.json" 
-I"D:\dev\projects\d-lang\WindowsApp1\third_parties\" 
-deps="Debug\WindowsApp1.dep" -c -of"Debug\WindowsApp1.obj" 
winmain.d
if errorlevel 1 goto reportError

set 
LIB="D:\dev\dmd2\windows\bin\..\lib64";"D:\software\vs2013\VC\li
\amd64";"C:\Program 
Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64";"C:\Program 
Files (x86)\Windows Kits\8.1\Lib\x64"
echo. > Debug\WindowsApp1.build.lnkarg
echo "Debug\WindowsApp1.obj" /OUT:"Debug\WindowsApp1.exe" 
/MAP:"Debug\WindowsApp1.map" ole32.lib kernel32.lib user32.lib 
comctl32.lib comdlg32.lib user32.lib kernel32.lib 
/LIBPATH:"D:\software\vs2013\VC\\lib\amd64\" /DEBUG 
/INCREMENTAL:NO /NOLOGO /SUBSYSTEM:WINDOWS >> 
Debug\WindowsApp1.build.lnkarg

"D:\software\VisualD\pipedmd.exe" -deps Debug\WindowsApp1.lnkdep 
"D:\software\vs2013\VC\\bin\link.exe" 
 Debug\WindowsApp1.build.lnkarg
if errorlevel 1 goto reportError
if not exist "Debug\WindowsApp1.exe" (echo 
"Debug\WindowsApp1.exe" not created! && goto reportError)

goto noError

:reportError
echo Building Debug\WindowsApp1.exe failed!

:noError
Output
DMD32 D Compiler v2.064
Copyright (c) 1999-2013 by Digital Mars written by Walter Bright
Documentation: http://dlang.org/
Usage:
   dmd files.d ... { -switch }

   files.d        D source files
    cmdfile       read arguments from cmdfile
   -allinst       generate code for all template instantiations
   -c             do not link
   -cov           do code coverage analysis
   -cov=nnn       require at least nnn% code coverage
   -D             generate documentation
   -Dddocdir      write documentation file to docdir directory
   -Dffilename    write documentation file to filename
   -d             silently allow deprecated features
   -dw            show use of deprecated features as warnings 
(default)
   -de            show use of deprecated features as errors (halt 
compilation)
   -debug         compile in debug code
   -debug=level   compile in debug code <= level
   -debug=ident   compile in debug code identified by ident
   -debuglib=name    set symbolic debug library to name
   -defaultlib=name  set default library to name
   -deps          print module dependencies 
(imports/file/version/debug/lib)
   -deps=filename write module dependencies to filename (only 
imports - deprecated)
   -g             add symbolic debug info
   -gc            add symbolic debug info, pretend to be C
   -gs            always emit stack frame
   -gx            add stack stomp code
   -H             generate 'header' file
   -Hddirectory   write 'header' file to directory
   -Hffilename    write 'header' file to filename
   --help         print help
   -Ipath         where to look for imports
   -ignore        ignore unsupported pragmas
   -inline        do function inlining
   -Jpath         where to look for string imports
   -Llinkerflag   pass linkerflag to link
   -lib           generate library rather than object files
   -m32           generate 32 bit code
   -m64           generate 64 bit code
   -main          add default main() (e.g. for unittesting)
   -man           open web browser on manual page
   -map           generate linker .map file
   -noboundscheck turns off array bounds checking for all functions
   -O             optimize
   -o-            do not write object file
   -odobjdir      write object & library files to directory objdir
   -offilename    name output file to filename
   -op            preserve source path for output files
   -profile       profile runtime performance of generated code
   -property      enforce property syntax
   -quiet         suppress unnecessary messages
   -release       compile release version
   -run srcfile args...   run resulting program, passing args
   -shared        generate shared library (DLL)
   -transition=id show additional info about language change 
identified by 'id'
   -transition=?  list all language changes
   -unittest      compile in unit tests
   -v             verbose
   -version=level compile in version code >= level
   -version=ident compile in version code identified by ident
   -vtls          list all variables going into thread local 
storage
   -w             warnings as errors (compilation will halt)
   -wi            warnings as messages (compilation will continue)
   -X             generate JSON file
   -Xffilename    write JSON file to filename
Building Debug\WindowsApp1.exe failed!


The error message is not meaningfull enough so that I can figure 
out what is wrong, therefore any help or suggestion is 
appreciated.

Thanks!
Jan 05 2014
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 05.01.2014 12:24, Palmic wrote:
 dmd -m64 -g -debug -X -Xf"Debug\WindowsApp1.json"
 -I"D:\dev\projects\d-lang\WindowsApp1\third_parties\"
 -deps="Debug\WindowsApp1.dep" -c -of"Debug\WindowsApp1.obj" winmain.d
What's bad here is the trailing \ in the import switch. It escapes the quote and confuses the command line parser. Please try removing the trailing \ from the D:\dev\projects\d-lang\WindowsApp1\third_parties\ setting.
Jan 05 2014
parent "Palmic" <mpalomas live.fr> writes:
Doh...

You are totally right, working fine now!

Thanks!

On Sunday, 5 January 2014 at 14:46:01 UTC, Rainer Schuetze wrote:
 On 05.01.2014 12:24, Palmic wrote:
 dmd -m64 -g -debug -X -Xf"Debug\WindowsApp1.json"
 -I"D:\dev\projects\d-lang\WindowsApp1\third_parties\"
 -deps="Debug\WindowsApp1.dep" -c -of"Debug\WindowsApp1.obj" 
 winmain.d
What's bad here is the trailing \ in the import switch. It escapes the quote and confuses the command line parser. Please try removing the trailing \ from the D:\dev\projects\d-lang\WindowsApp1\third_parties\ setting.
Jan 05 2014