Linux - SoftwareThis 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.
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.
Hey
i downloaded gcc , propably the latest version on my 'Fedora 7.
I am trying to compile a simple program.
If i save the program as <name>.f i get this message:
PROGRAM ela
1
Error: Non-numeric character in statement label at (1)
In file ela.f:1
PROGRAM ela
1
Error: Unclassifiable statement at (1)
In file ela.f:2
PRINT * ,'satanas'
1
Error: Non-numeric character in statement label at (1)
In file ela.f:2
PRINT * ,'satanas'
1
Error: Unclassifiable statement at (1)
In file ela.f:3
END
1
Error: Non-numeric character in statement label at (1)
In file ela.f:3
END
1
Error: Unclassifiable statement at (1)
Then if i save it as <name>.f95 and compile it again i get no errors. But the executable file does not work.
Any suggestions?
Is it possible to put also the f77 compiler to on my system?
thanks for the help But,...
Ok i checked the manual , i also checked the official site and it seems that everything should have been working .
With the something.f files it never works .
But with the something.f95 everything is fine.
I compile it , i get an executable file, and then the file does Nothing...!
I don want do download the g77 ,since the manual says that its ok compiling older fortran formats, and i dont wan to mix up things by downloading stuff.
I am a newbie so i know nothing about the sourcecodes , or about the libraries maybe is somethin to do with these things.
Can you show us your F95 code? (If you paste the code into a message, put it between "code" tags. I.e., a [ code ] and [ /code ] with no spaces within the brackets, or, if you're using the "reply" form instead of the default "quick reply" one, just highlight the code an click the "#" button at the top of the input form.)
I suspect that you're missing a library, but I'm surprised that you got an executable file if the library isn't available.
I compile it , i get an executable file, and then the file does Nothing...!
Does it really do nothing or does it give some errors? What is it expected to do? Can you post the code or the relevant parts of the code, as PTrenholme suggested?
[vassos@localhost fortr]$ f95 test.f95 -o test
[vassos@localhost fortr]$ test
[vassos@localhost fortr]$ dir
test test.f95
[vassos@localhost fortr]$
Here is the problem: you are executing the linux test command, not really the program you have just compiled. To be sure to execute the command which is in your current directory, you should launch it with its relative path:
Code:
./test
as in the example of PTrenholme for launching the a.out executable. Just a little of experience, then you will type ./ automatically!
YEEEEES! thanks a lot.
It worked finally. Just by using the ./ before calling the program.
And the -o command works to.
I have a question though what is the difference of using ./ ??
Some times when i am installing something while usinh configure, or make install , i have to use ./ and some times not
why is that???
I have a question though what is the difference of using ./ ??
Some times when i am installing something while usinh configure, or make install , i have to use ./ and some times not
why is that???
When you launch a command on Linux/Unix the system looks for that command on some directories. These are the directories listed in your environment variable called PATH. Try
Code:
echo $PATH
to inspect your own PATH. When an executable that matches the name you've typed on the command line, is encountered along the PATH, it is executed.
But you can also launch a command specifying its absolute or relative path: for example, if you have an executable called test in /home/vassos/fortr you can launch it with its absolute path, despite the directory you're currently into:
Code:
/home/vassos/fortr/test
or with its relative path... relative to the directory you're currently into:
Code:
cd /home/vassos/fortr
./test
or
Code:
cd /home/vassos/anotherdir
../fortr/test
This is the reason why typing simply test and not ./test, the system has executed the shell command test: it has encountered an executable called test along the PATH and has executed it. Simply. You can verify where the test command is located by:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.