You are here

Geany Portable, How to set up fortran compiler?

7 posts / 0 new
Last post
spg SCOTT
spg SCOTT's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2008-08-26 14:11
Geany Portable, How to set up fortran compiler?

Ok, so I want to use geany for compiling programs in fortran, but am at a loss as to what to do in order to do this...

As far as I know I need the fortran compiler which I believe is gfortran, but I don't quite know what to do with it, and how to make it work portably...

Help Wink

Thanks,

Scott

OliverK
OliverK's picture
Offline
Last seen: 3 years 3 months ago
Developer
Joined: 2007-03-27 15:21
Wow! A question Okay, I

Wow! A question Biggrin

Okay, I don't use fortran. But I presume the operation is similar to setting up mingw for C++. Note that Geany Portable is not going to provide you with gfortran portable Wink

Copy the compiler somewhere onto your flash drive. Copy the GeanyPortable.ini file from GeanyPortable\Other\Source to GeanyPortable.

You'll see a key called PathAdditions. Specify from the root of the portable device. Use should use @Drive for the drive letter. Specify in the format @Drive\Perl\bin\, etc. Separate with multiple entries with a semicolon.

Let me know if you need more help.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

spg SCOTT
spg SCOTT's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2008-08-26 14:11
Thanks

Ok, I think I have it right...I was confused at first with all the things concerning MinGW but I discovered you can just download the fortran one...

So now I have this folder specified in the PathAdditions:
@DRIVE\PortableApps\GeanyPortable\Fortran\bin\

Only problem I have is that I get compilation failed errors when trying to compile the file. Not sure whether this is down to the compiler or how I have set it up...

“There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!”Richard Feynman

OliverK
OliverK's picture
Offline
Last seen: 3 years 3 months ago
Developer
Joined: 2007-03-27 15:21
I'd have to see the errors,

I'd have to see the errors, your source, and know what compiler you used to even begin to help you.

My suggestion is to start with a simple fortran program. You should probably make the traditional "Hello World" program as an offering to appease the gods of programming.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

spg SCOTT
spg SCOTT's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2008-08-26 14:11
The program is a simple hello

The program is a simple hello world one...

PROGRAM hello_world
	IMPLICIT NONE
	
	WRITE(6,*) 'Hello world'
	
END PROGRAM hello_world

I am using gfortran and just the default build settings to compile it. There is no error that I can find, except that the compiler box at the bottom simply says 'compilation failed'

From looking at the MinGW site, I downloaded the necessary things for gfortran (the bin and dll) Is that all I need? I can't quite make out from the worrding whether I need other things...

Thanks

“There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!”Richard Feynman

spg SCOTT
spg SCOTT's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2008-08-26 14:11
I think I have found it now...

So before I just had the gfortran stuff, but missed all the stuff just above in the manual installation section of this page: http://mingw.org/wiki/InstallationHOWTOforMinGW

So once I added:

* binutils
* mingw-runtime (dev and dll)
* w32api
* Required runtime libraries for GCC:
o mpc (dev and dll)
o mpfr (dev and dll)
o gmp (dev and dll)
o pthreads (dev and dll)
o gomp
o ssp
* gcc-core (bin and dll)

Then moved the fortran stuff into the relevant folder, it now appears to compile correctly, albeit with a slightly odd format error...(but I think this is down to a compiling parameter...)

Now it even does (only) slightly more complicated things, like convert celcius to farenheit (just a program I made while learning how to write in fortran ;))

Now I have to deal a pack of cards to 4 people, which is harder Wink

Thanks for your help, will make my uni work a little easier.

“There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!”Richard Feynman

OliverK
OliverK's picture
Offline
Last seen: 3 years 3 months ago
Developer
Joined: 2007-03-27 15:21
No problem, glad I can help

No problem, glad I can help someone.

Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world

Log in or register to post comments