www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - ldc application unable to start

reply jmh530 <john.michael.hall gmail.com> writes:
I'm playing around with ldc on Windows 64bit. I'm able to compile 
some simple stuff, but I'm having an issue with something I 
compile giving an error:

The application was unable to start correctly (0xc00007b). Click 
OK to close the application.

This is effectively the ldc2 command I had run

ldc2 -m64 .\example\example.d .\source\[folder]\[file3].d 
.\source\[folder]\[file3].d .\source\[folder]\[file3].d 
-L=.\lib\win64\[libname].lib

(note that [libname].lib is a C library compiled with 64bit 
MSVC). I also got the same error with

ldc2 -m64 .\example\example.d .\source\[folder]\[file3].d 
.\source\[folder]\[file3].d .\source\[folder]\[file3].d 
.\lib\win64\[libname].lib

Because it compiles just fine with dmd, I figured there might be 
some issue with the way I'm doing the folder structure and 
passing that to ldc2. So I tried making a separate directory 
without the folder structure and ran

ldc2 -m64 example.d [file1].d [file1].d [file1].d -L=[libname].lib

and the program runs just fine. This suggests that I'm doing 
something wrong with how I refer to the files in the folder 
structure, but I have no idea what. I tried a few things, but 
it's probably something obvious I hadn't thought of.
Feb 21 2016
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
On 21.02.2016 18:11, jmh530 wrote:
 The application was unable to start correctly (0xc00007b). Click OK to
 close the application.
This error code is often caused by a DLL being compiled for the wrong architecture, so I guess that you have some 32-bit DLL in your original folder that is found instead of the 64-bit DLL.
Feb 21 2016
parent jmh530 <john.michael.hall gmail.com> writes:
On Sunday, 21 February 2016 at 17:54:30 UTC, Rainer Schuetze 
wrote:
 This error code is often caused by a DLL being compiled for the 
 wrong architecture, so I guess that you have some 32-bit DLL in 
 your original folder that is found instead of the 64-bit DLL.
That pointed me in the direction of the problem. For some reason on the computer I'm using I had only added the 32bit dll to the system path. I added the 64bit, logged out and logged back in and it worked.
Feb 21 2016