View Full Version : Question about the dependence of the compiler!
ddbb12
12-08-2004, 02:32 AM
Dear every one, I just have some question about the dependence of the compiler.
I have a set of program write in Fortran 90 standard. I had compile them by using the trail version of Lahey Fortran compiler, and it did really work well for me.
Now, I have a question like this. I want to copy all the executable file which compiled by Lahey Fortran to another machine without install the Fortran compiler. But I found that those code didn't work for me. If I want to do this, please tell me which parameter should I use in the compile command line ??
Thanks a lot!!
Lahey Support
12-08-2004, 07:57 PM
The .NET portion of the trial does not include the redistributable runtime, so you can run executables built with the .NET trial only on systems on which the trial is installed.
Executables built with the Win32 trial should run on systems without the trial installed.
What is the result when you try to run the executables?
ddbb12
12-09-2004, 08:15 AM
Thanks for your reply!
In fact , When I perform the executable file in the system without the compiler, they just don't work for me. and give some information I forgot it.
And I still have question about it. Does it can work in a machine without the compiler intalled when I include the runtime library in the exectalbe file ? Whether the runtime library include in the formal distribution of the compiler ? How can I do it If I want to include the runtime library in the executable file? Assuming I have had a formal distribution of the compiler.
By the way, I had used the Lahey LF95 compiler for linux to compile my program. Especially, I want to know that how can I get the executalbe file which independence with the compiler. It is to say that the executable file can run in different machine (but with the same OS ) whether the compiler intalled in it.
Thanks a lot!
ddbb12
12-09-2004, 02:50 PM
Should I add the -staticlink in the compile command line and copy all of the library file of myself ?? I found it in the manuscript! Is it right?? Please tell me, Thanks a lot!
Lahey Support
12-09-2004, 05:55 PM
Yes, an executable made with LF can run on a machine without the product installed.
The .NET runtime is included with the formal distribution of LF.
The Win32 runtime is included anytime the compiler makes an executable, a special option is not needed, it is the default behavior.
-staticlink is used when statically linking with libraries, not to make an executable for systems without LF.
For Linux you need to use the --staticlink option when building an executable to run on a system without LF95 but the same OS. If the OS is different you'll need to use the Linux linker option -static. This is different from Windows.
Without the information you forgot we won't be able to help you determine why the executable won't run.
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.