Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » compile on one operating system for another
compile on one operating system for another [message #61435] Tue, 11 February 2025 14:58 Go to next message
BetoValle is currently offline  BetoValle
Messages: 204
Registered: September 2020
Location: Brasil Valinhos SP
Experienced Member
Hi,

How to compile a U++ code on Windows to run on Linux?
If there is, is there a description on the website of how to do it?
( For example, in my country, users of the Lazarus language (IDE) compile it on Windows to run it on Linux
https://www.youtube.com/watch?v=XNIggwq_lo4 )

Thanks!
Re: compile on one operating system for another [message #61461 is a reply to message #61435] Sun, 16 February 2025 10:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
BetoValle wrote on Tue, 11 February 2025 14:58
Hi,

How to compile a U++ code on Windows to run on Linux?
If there is, is there a description on the website of how to do it?
( For example, in my country, users of the Lazarus language (IDE) compile it on Windows to run it on Linux
https://www.youtube.com/watch?v=XNIggwq_lo4 )

Thanks!


Well, we compile windows U++ installation in Linux using wine, but I guess that is not the best way.

Normally you basically need crosscompile toolchain. I believe every clang binary already supports all possible targets, but you also need to have all target platform dev libraries you need and set paths correctly.

https://clang.llvm.org/docs/CrossCompilation.html
Re: compile on one operating system for another [message #61541 is a reply to message #61435] Thu, 13 March 2025 04:39 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1430
Registered: December 2006
Ultimate Contributor
I compile code on Linux to run it on Windows for many years Smile

Regards,
Novo
Re: compile on one operating system for another [message #61543 is a reply to message #61541] Thu, 13 March 2025 16:10 Go to previous messageGo to next message
Tom1
Messages: 1301
Registered: March 2007
Ultimate Contributor
Hi Novo,

You mean from within TheIDE using clang? Would you like to share the details on how to do that, maybe even bm file(s)?

Best regards,

Tom
Re: compile on one operating system for another [message #61544 is a reply to message #61543] Thu, 13 March 2025 21:42 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1430
Registered: December 2006
Ultimate Contributor
Tom1 wrote on Thu, 13 March 2025 11:10
Hi Novo,

You mean from within TheIDE using clang? Would you like to share the details on how to do that, maybe even bm file(s)?

Best regards,

Tom

Hi Tom,

I use llvm-mingw.
I use llvm-mingw with umk to compile with a buildbot service in my homelab and with TheIDE to compile on desktop.
Below is a bm file from the buildbot service.
BUILDER = "CLANG";
COMPILER = "x86_64-w64-mingw32-clang++";
COMMON_OPTIONS = "";
COMMON_CPP_OPTIONS = "-Wall -Wno-logical-op-parentheses -std=c++17";
COMMON_C_OPTIONS = "";
COMMON_LINK = "";
COMMON_FLAGS = "WIN32";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
DEBUG_OPTIONS = "-O0";
DEBUG_FLAGS = "";
DEBUG_LINK = "";
RELEASE_BLITZ = "1";
RELEASE_LINKMODE = "1";
RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections";
RELEASE_FLAGS = "";
RELEASE_LINK = "-Wl,--gc-sections";
DEBUGGER = "gdb";
ALLOW_PRECOMPILED_HEADERS = "0";
DISABLE_BLITZ = "0";
PATH = "/home/buildbot/.local/soft/llvm-mingw/git/bin;/home/buildbot/.local/soft/llvm-mingw/git/x86_64-w64-mingw32/bin;/home/buildbot/.local/soft/upp/2022.2/SDL2/lib/x64;/home/buildbot/.local/soft/upp/2022.2/pgsql/x64/bin;/home/buildbot/.local/soft/upp/2022.2/mysql/lib64;";
INCLUDE = "/home/buildbot/.local/soft/upp/2022.2/SDL2/include;/home/buildbot/.local/soft/upp/2022.2/pgsql/x64/include;/home/buildbot/.local/soft/upp/2022.2/mysql/include;/home/buildbot/.local/soft/upp/2022.2/openssl/include;";
LIB = "/home/buildbot/.local/soft/upp/2022.2/SDL2/lib/x64;/home/buildbot/.local/soft/upp/2022.2/pgsql/x64/lib;/home/buildbot/.local/soft/upp/2022.2/mysql/lib64;/home/buildbot/.local/soft/upp/2022.2/openssl/lib64;";
LINKMODE_LOCK = "0";

I wrote a tiny tool to generate bm files for all configurations I use.


Regards,
Novo
Re: compile on one operating system for another [message #61545 is a reply to message #61544] Thu, 13 March 2025 21:48 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1430
Registered: December 2006
Ultimate Contributor
There is also a Mac OS X cross toolchain for Linux, FreeBSD, and OpenBSD called osxcross.
I tried to set it up several years ago but haven't finished the project.


Regards,
Novo
Re: compile on one operating system for another [message #61550 is a reply to message #61544] Sat, 15 March 2025 13:39 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 266
Registered: July 2011
Location: Bangalore
Experienced Member
Hi

Request some one to share BM file for Cross Compile on Linux for Raspberry PI.


Warm Regards

Deepak
Re: compile on one operating system for another [message #61578 is a reply to message #61544] Wed, 19 March 2025 20:34 Go to previous messageGo to next message
Tom1
Messages: 1301
Registered: March 2007
Ultimate Contributor
Novo wrote on Thu, 13 March 2025 22:42
Tom1 wrote on Thu, 13 March 2025 11:10
Hi Novo,

You mean from within TheIDE using clang? Would you like to share the details on how to do that, maybe even bm file(s)?

Best regards,

Tom

Hi Tom,

I use llvm-mingw.
I use llvm-mingw with umk to compile with a buildbot service in my homelab and with TheIDE to compile on desktop.
Below is a bm file from the buildbot service.
BUILDER = "CLANG";
COMPILER = "x86_64-w64-mingw32-clang++";
COMMON_OPTIONS = "";
COMMON_CPP_OPTIONS = "-Wall -Wno-logical-op-parentheses -std=c++17";
COMMON_C_OPTIONS = "";
COMMON_LINK = "";
COMMON_FLAGS = "WIN32";
DEBUG_INFO = "2";
DEBUG_BLITZ = "1";
DEBUG_LINKMODE = "1";
DEBUG_OPTIONS = "-O0";
DEBUG_FLAGS = "";
DEBUG_LINK = "";
RELEASE_BLITZ = "1";
RELEASE_LINKMODE = "1";
RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections";
RELEASE_FLAGS = "";
RELEASE_LINK = "-Wl,--gc-sections";
DEBUGGER = "gdb";
ALLOW_PRECOMPILED_HEADERS = "0";
DISABLE_BLITZ = "0";
PATH = "/home/buildbot/.local/soft/llvm-mingw/git/bin;/home/buildbot/.local/soft/llvm-mingw/git/x86_64-w64-mingw32/bin;/home/buildbot/.local/soft/upp/2022.2/SDL2/lib/x64;/home/buildbot/.local/soft/upp/2022.2/pgsql/x64/bin;/home/buildbot/.local/soft/upp/2022.2/mysql/lib64;";
INCLUDE = "/home/buildbot/.local/soft/upp/2022.2/SDL2/include;/home/buildbot/.local/soft/upp/2022.2/pgsql/x64/include;/home/buildbot/.local/soft/upp/2022.2/mysql/include;/home/buildbot/.local/soft/upp/2022.2/openssl/include;";
LIB = "/home/buildbot/.local/soft/upp/2022.2/SDL2/lib/x64;/home/buildbot/.local/soft/upp/2022.2/pgsql/x64/lib;/home/buildbot/.local/soft/upp/2022.2/mysql/lib64;/home/buildbot/.local/soft/upp/2022.2/openssl/lib64;";
LINKMODE_LOCK = "0";

I wrote a tiny tool to generate bm files for all configurations I use.


Hi Novo,

Thanks for the info. It's unfortunate that Linux Mint does not have a package for llvm-mingw... so it takes a bit more effort to get it going.

Best regards,

Tom
Re: compile on one operating system for another [message #61625 is a reply to message #61578] Mon, 31 March 2025 18:00 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1430
Registered: December 2006
Ultimate Contributor
Tom1 wrote on Wed, 19 March 2025 15:34

It's unfortunate that Linux Mint does not have a package for llvm-mingw... so it takes a bit more effort to get it going.

I personally build it from the src ...


Regards,
Novo
Re: compile on one operating system for another [message #61629 is a reply to message #61578] Tue, 01 April 2025 20:07 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1430
Registered: December 2006
Ultimate Contributor
Tom1 wrote on Wed, 19 March 2025 15:34
It's unfortunate that Linux Mint does not have a package for llvm-mingw... so it takes a bit more effort to get it going.

Actually, llvm-mingw ships prebuilt version for Ubuntu. Linux Mint is based on Ubuntu ...


Regards,
Novo
Re: compile on one operating system for another [message #61633 is a reply to message #61545] Wed, 02 April 2025 19:13 Go to previous message
Novo is currently offline  Novo
Messages: 1430
Registered: December 2006
Ultimate Contributor
Novo wrote on Thu, 13 March 2025 16:48
There is also a Mac OS X cross toolchain for Linux, FreeBSD, and OpenBSD called osxcross.
I tried to set it up several years ago but haven't finished the project.

I was able to make it work. U++ requires compiler-rt installed. It took me quite a lot of time to figure out.


Regards,
Novo
Previous Topic: Broken compilation
Next Topic: Technology lab vs External resources
Goto Forum:
  


Current Time: Fri Apr 25 07:51:25 CEST 2025

Total time taken to generate the page: 0.00854 seconds