Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free Compiler and GUI libraries

Status
Not open for further replies.

GerritGroot

Technical User
Nov 3, 2006
291
ES
Hi,

I'm new at this forum, so I hope I'm not asking for something obvious. In fact I've got 2 questions.

Does there exist a free F90 compiler that you are allowed to use for commercial purposes?

Does there exist a free library set to build GUIs under F90, that you are allowed to use for commercial purposes?

Hope I'm not asking for too much...

Thanks,

Gerrit Groot
 
Compiler - try g95 or gfortran

It may have an interface for fltk through C (it didn't the last time I looked but that was 2 years ago). Alternatively, if you have java installed, you could try JAPI.
 
Thanks a lot I'll try the compiler.

What's fltk?

About japi, the problem is that you can't make a stand alone executable, you'll depend on the javaRE as I understood from their website.

Has anyone experience with Pilib (Platform Independent Fortran Library)??

Can't find any screenshots/manual/experiences of pilib so far on the web.

 
FLTK - Fast Light Tool Kit. There are Linux and Windows versions of it but I haven't found a Fortran interface for it.
 
pilib is quite new. It is a GTK wrapper. Never tried it before. I'll see if it builds with g95. Alternatively I'll have to download the latest gcc and gfortran.

Alternatively you could try the Salford/Silverfrost compiler but that is just Windows based.
 
Indrajit7(Technical User)

Hi
I have windows XP home and I have g95 installed. Recently, I have downloaded JAPI and I have changed environment variable by editing to c:\Program Files\Japi. But after using command g95 -o myprog myprog.f -ljapi, I observed that program is getting compiled but not linked with japi library. I have also include japi.f on the top of my program. I would greatly appreciate if someone could help me in trouble shooting.

Thanks
 
Hi
I have windows XP home and I have g95 installed. Recently, I have downloaded JAPI and I have changed environment variable by editing to c:\Program Files\Japi. But after using command g95 -o myprog myprog.f -ljapi, I observed that program is getting compiled but not linked with japi library. I have also include japi.f on the top of my program. I would greatly appreciate if someone could help me in trouble shooting.

Thanks
 
It depends on your directory structure. Say you have the following structure
Code:
+-lib
|   +--libjapi.a
|
+--src
    +--myprog.f
You need to tell the compiler where libjapi.a lives. In the case above it would be something like

g95 myprog.f -o myprog.exe -L..\lib -ljapi

the -L tells it to look in ..\lib for libjapi.a. I normally set JAPI to the location where all the japi stuff lives so I can use -L%JAPI%\lib

After you've done that, you need to start japi before you can run your program. Something like

start jre -cp %JAPI%\lib\JAPI.jar JAPI

Once that has started, you can run myprog.exe
 
Many thanks xwb

The libjapi.a file is in the directory "Program Files\japi" directory. I have copied my file example_japi.f to this directory and I have used following command "g95 example_japi.f -o example_japi.exe .\ -ljapi". It worked fine. But unfortunately, I am unable to link library from other directory. Note that I have mentioned under PATH variable ;c:\Program Files\Japi. Is there anything I am missing? I have no clue at all. Many thanks once again
 
As I said before you need a -L
Having said that, the next problem is "Program Files" - it has a space in it. You could either use the short name, something like PROGRA~1 or put it in quotes.
 
Dear xwb

Sorry to mention that I did use -L as suggested by you. I have also tried with your suggestion to the directory "Program Files" under quotes in either case such as Windows XP environment declaration and in command line. either of the case it did not work. I got back to earlier description of environment (that means no quote for Program Files) and use the command as written below
C:\MyProgram\Visualization\g95 example_japi.f -o example.exe -L ..\..\"Program Files"\Japi -ljapi

g95: Files\Japi -ljapi : No such file or directory

I have tried also
C:\MyProgram\Visualization\g95 example_japi.f -o example.exe -L ..\..\Program Files\Japi -ljapi

Result remains same

g95: Files\Japi -ljapi : No such file or directory

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top