Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-07-2010, 02:18 PM
|
#1
|
|
LQ Newbie
Registered: Dec 2009
Posts: 5
Rep:
|
fortran compiler that can compile progs on a linux machine, but execute on windows XP
hi, i'm currently using the gnu compiler "gfortran" , but i don't think the executable files it creates are compatible with windows XP (though i may be mistaken). my boss needs a few simple programs that i have written, but i will not be able to compile the code on his pc. are there any compilers out there that i can use to create such executables?
|
|
|
|
01-07-2010, 02:21 PM
|
#2
|
|
Member
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 527
Rep: 
|
I don't believe you can use a compiler on one os to compile files for another unless you are using a language which runs in a virtual machine such as java.
|
|
|
|
01-07-2010, 02:59 PM
|
#3
|
|
Senior Member
Registered: Dec 2007
Distribution: Mepis, Centos
Posts: 4,674
|
I'm not sure what exactly is available in the MINGW project. If they don't have what you are asking for, I doubt it is elsewhere.
MINGW is a port of the GNU compiler (but I'm not sure whether includes fortran or whether it is just C and C++) both to produce native Windows executables and to be run on Windows.
Some people have built compilers from the MINGW sources that produce the same Windows output as MINGW but run on Linux. That would be what you want. I don't know whether there is any released copy of that, or whether it is something only a MINGW expert can do with the MINGW source code.
Alternately, why can't you compile on a Windows machine? No access to a Windows machine? Or just no compatible compiler?
I think either Cygwin or MINGW or both includes a gfortran compiler. Both Cygwin and Mingw are designed to compile on Windows. IIUC, Mingw produces true native Windows executables, while Cywin produces semi-native executables than run on Windows with support from a Cygwin .DLL (internally use Unix semantics for various OS requests that get translated to Windows calls by that DLL).
Another alternate (if you don't have access to a Windows system, nor a license to run Windows in a VM in Linux): You can run Mingw or Cygwin or other Windows fortran compiler in wine on Linux to produce a Windows executable (may require installing a significant number of include files and lib files from a Windows development environment into your wine environment).
Last edited by johnsfine; 01-07-2010 at 03:06 PM.
|
|
|
|
01-07-2010, 03:04 PM
|
#4
|
|
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Laptop: Slackware 14.0 // Desktop: Slackware64 14.0 // Netbook: Slackware 14.0
Posts: 6,176
|
MinGW is available as a cross-compiler on Debian, but I don't know about other distros.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:32 AM.
|
|
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
|
|