Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3396628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:25:50+00:00 2026-05-18T04:25:50+00:00

Clarification When I mention cross compiling I mean from one language to another (think

  • 0

Clarification

When I mention cross compiling I mean from one language to another (think GWT), rather than from a host platform to a targeted platform.

Background

I am developing an Arabic programming language which I cross compiled to Java, this saved me the platform specific hassles. Now I had to put this on hold and turned to cross compiling to C for various reasons.

I want to develop a single library that would be replaced with an equivalent library of the system it’s running on when compiled.

For example, if the programmer writes a GUI drawing function in the Arabic programming language and compiles, it would be cross compiled to win32 code if compiled under Windows, GTK+ under Gnome, Qt under KDE, etc. The same approach will be used for other libraries as well.

Question

Is it worth going through all this trouble to end up with a compiled executable or am I better off with a Virtual Machine approach? Advantages and disadvantages of picking either (from the language developer perspective rather than the programmer using the language)? Are there any other factors I have to consider?

Any reference links for further reading would be greatly appreciated 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:25:50+00:00Added an answer on May 18, 2026 at 4:25 am

    You should cross-compile to the language that best supports the assumptions and ideas underlying your language. If your language is garbage collected, all function calls are method calls, and doesn’t let you work with addresses as data, then Java is the language to be compiling to.

    There are compilers that compile Java code to native. So if you want your program to run natively, you can use those.

    When you are ready to make your own full compiler for your language, then you can divorce yourself from Java or whatever it is you choose.

    This basic approach has been used by a number of languages. Usually the target language is C because you can do low-level stuff in C that you can’t do in any other language, it has mature optimizing compilers, and runs very fast natively. The way C’s symbols, libraries and calling conventions work is also well understood and tends to be a rigorously defined and supported by several languages on any given platform. This allows the new language to have immediate access to a whole host of libraries written for C.

    C++ started this way (the original compiler was called cfront), and I believe OCaml started this way too. I think if you dig a little you can find numerous other languages for which this is true.

    But if you don’t need Cs low-level features a lot of those arguments apply to Java as well. A number of newer languages (Scala, for example) use the JVM in this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any standard way to route all Key events from the control A
I am separating some XHTML from PHP by putting the XHTML into a separate
What are good python libraries for the following needs: MVC Domain Abstraction Database Abstraction
I found Question#1321270 for post install. My main target for the moment is bdist_wininst,
Is there a standard way to bind arrays (of scalars) in a SQL query?
I have a C# Solution that includes several websites. Those websites have some communal
I'm really confused as to why this operation works. Can someone explain it? $test1
With at-rules, it's possible to have a ruleset for elements during that at-rule event
I have a performance problem related to string comparison (in Java). I'm working on
I was here yesterday and got some really great answers. I took what I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.