www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Path separator for ldc2 vs. dmd

reply Brian <brian.schrom pnnl.gov> writes:
I hope this is user error and is obvious, but I've spent a bit of 
time searching (and trying permutations) and not determined what 
is causing the path separator message below.

This is part of a dlangui application that works fine if I use 
dmd, but munges the path separator if I set the compiler to ldc2?

(The paths have been shortened with .... for pasting purposes.)

C:\....>dub --compiler=c:....\ldc2\bin\ldc2
Performing "debug" build using c:....\ldc2\bin\ldc2 for x86.
derelict-util 2.0.6: building configuration "library"...
Error: module sourcederelictutilexception is in file 
'sourcederelictutilexception.d' which cannot be read
import path[0] = c:..../ldc2/bin/../include/d/ldc
import path[1] = c:..../ldc2/bin/../include/d
import path[2] = source
c:....\ldc2\bin\ldc2 failed with exit code 1.

C:....\dub\packages\derelict-util-2.0.6>

Thanks,

Brian
Jun 14 2016
parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
Hi Brian,

On 14 Jun 2016, at 18:11, Brian via digitalmars-d-ldc wrote:
 I hope this is user error and is obvious, but I've spent a bit of time 
 searching (and trying permutations) and not determined what is causing 
 the path separator message below.
 […]
 C:\....>dub --compiler=c:....\ldc2\bin\ldc2
 […]
 Error: module sourcederelictutilexception is in file 
 'sourcederelictutilexception.d' which cannot be read
Could you have a look at the actual LDC command line (dub has a verbose switch)? We might not be handling a particular style of path separators correctly. Does it work if you use ldmd2 as the compiler? Best, David
Jun 14 2016
parent reply Brian <brian.schrom pnnl.gov> writes:
On Tuesday, 14 June 2016 at 17:21:29 UTC, David Nadlinger wrote:

Thank you for your help.

 Could you have a look at the actual LDC command line (dub has a 
 verbose switch)? We might not be handling a particular style of 
 path separators correctly.
c:....\ldc2\bin\ldc2.exe -lib -of.dub\build\library-debug-windows-x86-ldc_0-01B767E781ADDCD25E6D4D6DFCF523 D\libDerelictUtil.a -d -debug -g -w -oq -od=.dub/obj -d-version=Have_derelict_util -Isource source\derelict\util\exception.d source\derelict\util\loader.d source\derelict\ut il\sharedlib.d source\derelict\util\system.d source\derelict\util\wintypes.d source\derelict\util\xtypes.d Error: module sourcederelictutilexception is in file 'sourcederelictutilexception.d' which cannot be read import path[0] = c:..../ldc2/bin/../include/d/ldc import path[1] = c:..../ldc2/bin/../include/d import path[2] = source If I run the ldc2 command directly, then it generates the .obj files and fails on the lib tool. It's invoking digital mars lib, but looks like maybe I need to have the visual studio linker/librarian tool? The path separator issue seems to be something invoking ldc2 with dub C:...\derelict-util-2.0.6>dub --version DUB version 0.9.24, built on Sep 20 2015
 Does it work if you use ldmd2 as the compiler?
It makes it further and complains that I do not have visual studio installed (which I do not, though I have the run-time installed). I was hoping not to need visual studio and thought that with llvm, I wouldn't.
 Best,
 David
Jun 14 2016
parent kink <noone nowhere.com> writes:
On Tuesday, 14 June 2016 at 17:55:34 UTC, Brian wrote:
 It makes it further and complains that I do not have visual 
 studio installed (which I do not, though I have the run-time 
 installed).  I was hoping not to need visual studio and thought 
 that with llvm, I wouldn't.
You do need the Visual Studio linker. If you don't want to install VS, the Visual C++ Build Tools should work too, see http://forum.dlang.org/thread/dntbsrpixsakhtebcwmh forum.dlang.org.
Jun 15 2016