Thread overview
LDC2 compiled with MSVC forces object files to end with .obj
Dec 21, 2013
Dwhatever
Jan 01, 2014
Kai Nacke
Jan 02, 2014
Kai Nacke
Jan 03, 2014
Dwhatever
December 21, 2013
I use a Visual Studio compiled LDC2 and use it for cross compiling ARM targets. I need to use the binutils linker and there the default object file extension is .o rather than .obj. Is there a possibility for LDC2 to output the default object file extension to .o instead of .obj?

Right now I just do a rename in the makefile but it would be nice if LDC2 could do this directly.

BTW. The binary version of LDC2 compiled with MSVC on this site is compiled as a Debug version. This makes it dependent on MSVCP110D.dll which is not provided in the redistributable C++ libraries. I've successfully compiled it as Release and it is also way faster because the run time checks are disabled. In the future, compile it as Release instead.
January 01, 2014
On Saturday, 21 December 2013 at 14:31:25 UTC, Dwhatever wrote:
> I use a Visual Studio compiled LDC2 and use it for cross compiling ARM targets. I need to use the binutils linker and there the default object file extension is .o rather than .obj. Is there a possibility for LDC2 to output the default object file extension to .o instead of .obj?
>
> Right now I just do a rename in the makefile but it would be nice if LDC2 could do this directly.

I created an issue for this bug: https://github.com/ldc-developers/ldc/issues/566

> BTW. The binary version of LDC2 compiled with MSVC on this site is compiled as a Debug version. This makes it dependent on MSVCP110D.dll which is not provided in the redistributable C++ libraries. I've successfully compiled it as Release and it is also way faster because the run time checks are disabled. In the future, compile it as Release instead.

Well, I will do this when I create an official release. For now, the binaries are provided "as-is" because there are still problems.

Nevertheless, if you find bugs in the MSVC version please report them!

Regards,
Kai
January 02, 2014
On Saturday, 21 December 2013 at 14:31:25 UTC, Dwhatever wrote:
> I use a Visual Studio compiled LDC2 and use it for cross compiling ARM targets. I need to use the binutils linker and there the default object file extension is .o rather than .obj. Is there a possibility for LDC2 to output the default object file extension to .o instead of .obj?

You can set a target triple: -mtriple=arm-linux. Then the file extension .o is used.

Regards,
Kai
January 03, 2014
On Thursday, 2 January 2014 at 16:28:01 UTC, Kai Nacke wrote:
> On Saturday, 21 December 2013 at 14:31:25 UTC, Dwhatever wrote:
>> I use a Visual Studio compiled LDC2 and use it for cross compiling ARM targets. I need to use the binutils linker and there the default object file extension is .o rather than .obj. Is there a possibility for LDC2 to output the default object file extension to .o instead of .obj?
>
> You can set a target triple: -mtriple=arm-linux. Then the file extension .o is used.
>
> Regards,
> Kai

Thanks, that seems to do the trick.