digitalmars.D - Cross Compiling With LDC Under Single OS
- Elina =?UTF-8?B?S8O8w6fDvGtheQ==?= (10/10) Dec 16 2020 Hi, I'm new started the Dlang. I want to cross compile with LDC
- =?UTF-8?Q?Ali_=c3=87ehreli?= (6/7) Dec 16 2020 Could someone please review whether the instructions on that page are=20
- kinke (7/16) Dec 16 2020 GDC doesn't support Windows.
- Elina =?UTF-8?B?S8O8w6fDvGtheQ==?= (13/15) Dec 18 2020 Thank you for all response. Dear @kinke, my goal is to create an
- kinke (8/12) Dec 18 2020 I meant more specifics wrt. this - what's the error? Not a PE
- Elina =?UTF-8?B?S8O8w6fDvGtheQ==?= (12/15) Dec 18 2020 I'm compiling under in Linux. When I remove -c parameter, I will
- Jacob Carlborg (11/22) Dec 18 2020 The first error that you linked to indicate that you're missing the
- Elina =?UTF-8?B?S8O8w6fDvGtheQ==?= (2/13) Dec 19 2020 Thank you for your response. I solved it.
Hi, I'm new started the Dlang. I want to cross compile with LDC on a single operating system but when I follow the steps in the link below, I get a problem: https://wiki.dlang.org/Cross-compiling_with_LDC Under Linux; ldc -mtriple = x86_64-windows-msvc -c foo.d -of = foo.exe The exe file I created with the command, doesn't work in Windows 10. Likewise, my Linux code that I compiled under Windows doesn't work on Linux. Can you help me?
Dec 16 2020
On 12/16/20 8:30 AM, Elina K=C3=BC=C3=A7=C3=BCkay wrote:https://wiki.dlang.org/Cross-compiling_with_LDCCould someone please review whether the instructions on that page are=20 up-to-date. Thank you. Should Elina try gdc instead? Do others have experience in=20 cross-compiling with gdc? Ali
Dec 16 2020
On Wednesday, 16 December 2020 at 21:28:19 UTC, Ali Çehreli wrote:On 12/16/20 8:30 AM, Elina Küçükay wrote:They are up-to-date.https://wiki.dlang.org/Cross-compiling_with_LDCCould someone please review whether the instructions on that page are up-to-date. Thank you.Should Elina try gdc instead? Do others have experience in cross-compiling with gdc?GDC doesn't support Windows. On Wednesday, 16 December 2020 at 16:30:07 UTC, Elina Küçükay wrote:The exe file I created with the command, doesn't work in Windows 10. Likewise, my Linux code that I compiled under Windows doesn't work on Linux.Please be more specific, I can't provide any remote help based on 'it doesn't work'.
Dec 16 2020
On Wednesday, 16 December 2020 at 22:32:02 UTC, kinke wrote:Please be more specific, I can't provide any remote help based on 'it doesn't work'.Thank you for all response. Dear kinke, my goal is to create an executable file on the Linux operating system that can run on Windows. In the first transmission, I reviewed the document written for LLVM, but wasn't successful. The command below creates the exe file for me but this exe file doesn't work in Windows. ldc -mtriple = x86_64-windows-msvc -c foo.d -of = foo.exe GDC does not support Windows, so I am trying to compile with LLVM. Does LDC support platform independent compilation for D language? I apologize for answering late, I did not have the opportunity to write an answer due to my exams.
Dec 18 2020
On Friday, 18 December 2020 at 11:00:01 UTC, Elina Küçükay wrote:but this exe file doesn't work in WindowsI meant more specifics wrt. this - what's the error? Not a PE executable? Some missing DLL because a Visual C++ runtime 2015+ isn't installed?ldc -mtriple = x86_64-windows-msvc -c foo.d -of = foo.exeThe Wiki uses `ldc2 -mtriple=x86_64-windows-msvc foo.d`. `-c` means 'compile only', so you're effectively compiling a COFF object file and naming it `foo.exe`, so no, that won't work.Does LDC support platform independent compilation for D language?Yes, the Wiki page isn't made up. ;)
Dec 18 2020
On Friday, 18 December 2020 at 13:40:09 UTC, kinke wrote:I meant more specifics wrt. this - what's the error? Not a PE executable? Some missing DLL because a Visual C++ runtime 2015+ isn't installed?I'm compiling under in Linux. When I remove -c parameter, I will get this error: https://paste.ubuntu.com/p/7dw9CxG4BJ/ ldc -mtriple=x86_64-windows-msvc foo.d ----- I'm downloading LDC for Windows release for usage missing libraries under Linux. When I include missing library with -L-L= parameter, get an error again. ldc -mtriple=x86_64-windows-msvc -L-L=lib/mingw foo.d -of=foo.exe I may not have written clearly, I don't have very good English. As I mentioned, I just started the D language and my goal is to make a very simple D console program workable for Windows.
Dec 18 2020
On 2020-12-18 18:00, Elina Küçükay wrote:I'm compiling under in Linux. When I remove -c parameter, I will get this error: https://paste.ubuntu.com/p/7dw9CxG4BJ/ ldc -mtriple=x86_64-windows-msvc foo.d ----- I'm downloading LDC for Windows release for usage missing libraries under Linux. When I include missing library with -L-L= parameter, get an error again. ldc -mtriple=x86_64-windows-msvc -L-L=lib/mingw foo.d -of=foo.exeThe first error that you linked to indicate that you're missing the standard library and runtime library compiled for Windows. You can get those by downloading the Windows version of LDC, unpack it and place the files in the lib32/lib64 directory in the lib32/lib64 directory of your Linux LDC version. This is available here in the documentation [1]. The second error, is that the same error or a new error? You need to include the error in your message so we can see it to be able to help you. [1] https://wiki.dlang.org/Cross-compiling_with_LDC#Default_libraries -- /Jacob Carlborg
Dec 18 2020
On Friday, 18 December 2020 at 19:07:48 UTC, Jacob Carlborg wrote:The first error that you linked to indicate that you're missing the standard library and runtime library compiled for Windows. You can get those by downloading the Windows version of LDC, unpack it and place the files in the lib32/lib64 directory in the lib32/lib64 directory of your Linux LDC version. This is available here in the documentation [1]. The second error, is that the same error or a new error? You need to include the error in your message so we can see it to be able to help you. [1] https://wiki.dlang.org/Cross-compiling_with_LDC#Default_librariesThank you for your response. I solved it.
Dec 19 2020