Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-12-2009, 05:20 PM
|
#1
|
Senior Member
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249
Rep:
|
Cross-compiling v/s cross-building
I understand the meaning of Cross-compiling as explained here. But what do we mean when we say cross-building? Are those two different terms? Or one is a subset of other or something like that?
Thank you.
|
|
|
05-12-2009, 05:43 PM
|
#2
|
Senior Member
Registered: May 2005
Posts: 4,481
|
Quote:
Originally Posted by kushalkoolwal
I understand the meaning of Cross-compiling as explained here. But what do we mean when we say cross-building? Are those two different terms? Or one is a subset of other or something like that?
Thank you.
|
Yes, you have to first build your cross-tools, so, I guess, this is what they call cross-building.
For example, I recently built cross-gcc to produce executables for Windows under Linux, then I used the cross-gcc under Linux (i.e. cross-compiled) to produce an executable for Windows.
|
|
|
05-12-2009, 06:01 PM
|
#3
|
Senior Member
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249
Original Poster
Rep:
|
Quote:
Originally Posted by Sergei Steshenko
Yes, you have to first build your cross-tools, so, I guess, this is what they call cross-building.
For example, I recently built cross-gcc to produce executables for Windows under Linux, then I used the cross-gcc under Linux (i.e. cross-compiled) to produce an executable for Windows.
|
Thanks Sergei. I think I am beginning to understand the difference. So basically before you can do cross-compiling you need build a cross-tool which will do your cross-compiling, right?
On a side note, if it is OK with you can you point out the guide which you followed to produce Windows executable under Linux?
|
|
|
05-13-2009, 05:49 AM
|
#4
|
Senior Member
Registered: May 2005
Posts: 4,481
|
Quote:
Originally Posted by kushalkoolwal
...
On a side note, if it is OK with you can you point out the guide which you followed to produce Windows executable under Linux?
|
http://www.profv.de/programme/ ->
http://www.profv.de/mingw_cross_env/ ->
http://www.profv.de/mingw_cross_env/README.html .
Download and build (after reading the above) - just
make gcc
after editing Makefile. You may build much more than just 'gcc'.
Then you build essentially the same way as for Linux, just using the full path to cross compiler, e.g.
~/mingwi686/bin/i686-mingw32msvc-gcc hello.c -o hello.exe
.
You can first try under 'wine':
wine hello.exe
.
I've been dealing so far with non-GUI Windows apps, but there are examples of GUI ones too.
|
|
|
All times are GMT -5. The time now is 06:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|