Re: compiling issue on link using the -plat option with TDM-GCC-64

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...
clkeriolet said...

Hi everybody, I try to compile for Linux using -plat a small testcl.ex on my Windows10 PC. I get the message : cannot find -ldl . I suppose there is a missing library ? I cannot find out which one and where to get it. Maybe some of you have an idea about that . Thanks for help !

Unfortunately, cross-compiling just isn't that straight-forward. Some of the translator options, like -arch and -plat, seem to exist purely for use in building Euphoria itself.

Specifically, they are for cross-translation of the Euphoria interpreter and translator: the idea being that you can't run the Euphoria interpreter or translator binaries on a new platform (like OpenSolaris) but you can translate the source to C and then run gcc on the native platform to finish the build.

My recollection is that this didn't work very well. Often we'd have to temporary hardcode a hack in the Eu source before cross-translationg it or else the binary wouldpartly behave as if it was on the host platform.

ghaberek said...

It should possible to cross-compile applications from Linux to Windows by using -plat and -cc-prefix, but I doubt it'll work the other way around. You'd need a Linux compiler that runs on Windows and TDM-GCC is built for Windows.

-Greg

It's technically possible, but probably more trouble than it's worth. You'd likely have to build your own cross compiler for GNU/Linux on Window using a Windows port of GCC. Which is certainly possible, but a lot of hard work. (If you want to take a look at what would be involved, see https://stackoverflow.com/questions/4769968/c-cross-compiler-from-windows-to-linux/4770417#4770417 )

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu