Author Topic: How to cross-compile from Windows to Linux?  (Read 5746 times)

Offline Rimdeker

  • Single posting newcomer
  • *
  • Posts: 5
How to cross-compile from Windows to Linux?
« on: December 11, 2008, 10:13:54 pm »
I've been looking through the forum and found a post which gives a little hint but it was not really a big help. What I wanted to know is:
Is there a way to cross-compile files on Windows for Linux? If yes, how?

I got another less important question:
If I compile on Linux would I automatically get Linux files? I was thinking about switching to Linux or least having a dual-boot. I'm really new to programing and if cross-compiling is too hard for me would compiling on Linux be a more-or-less simple option? Would I have to change the source-code somehow?


C++? I like that stuff!

Be nice , be cool.
A smile is like a boomerang, it'll eventually come back to you :).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: How to cross-compile from Windows to Linux?
« Reply #1 on: December 11, 2008, 10:37:50 pm »
Please remove the non-english content from your signature.

If you compile on linux, you get linux-files of course.
Cross-compiling on windows for linux is something I never tried, even if it might be possible.
The only article I know about that is this one : http://metamod-p.sourceforge.net/cross-compiling.on.windows.for.linux.html.

The other way is much better documented.

Offline Rimdeker

  • Single posting newcomer
  • *
  • Posts: 5
Re: How to cross-compile from Windows to Linux?
« Reply #2 on: December 11, 2008, 11:21:04 pm »
Quote
The other way is much better documented.

Yea, I noticed that , as well. Well... I could simply do stuff for Linux on Linux and programs for Windows on Windows. But, I kinda feel like I'm simply avoiding the problem. I will try out that link you gave me, it does look kinda complicated but oh well.

By the way, wouldn't it be an interesting idea to implement a cross-compiler in C::B ? Maybe too much to ask for? lol
C++? I like that stuff!

Be nice , be cool.
A smile is like a boomerang, it'll eventually come back to you :).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: How to cross-compile from Windows to Linux?
« Reply #3 on: December 11, 2008, 11:28:33 pm »
Quote
The other way is much better documented.

Yea, I noticed that , as well. Well... I could simply do stuff for Linux on Linux and programs for Windows on Windows. But, I kinda feel like I'm simply avoiding the problem. I will try out that link you gave me, it does look kinda complicated but oh well.

By the way, wouldn't it be an interesting idea to implement a cross-compiler in C::B ? Maybe too much to ask for? lol

There are several threads about cross-compiling on the forum, and two wiki-articles:
http://forums.codeblocks.org/index.php/topic,6876.0.html
http://wiki.codeblocks.org/index.php?title=Cross_Compiling_wxWidgets_Applications_on_Linux
http://forums.codeblocks.org/index.php/topic,6876.0.html
http://wiki.codeblocks.org/index.php?title=Code::Blocks_and_Cross_Compilers

PS
Thanks for changing your signature.

Offline Rimdeker

  • Single posting newcomer
  • *
  • Posts: 5
Re: How to cross-compile from Windows to Linux?
« Reply #4 on: December 11, 2008, 11:33:03 pm »
Thank you for the links :) and no probs lol. I can imagine why you wouldn't like something on the forum that you can't understand and stuff.
C++? I like that stuff!

Be nice , be cool.
A smile is like a boomerang, it'll eventually come back to you :).