Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-03-2007, 01:27 PM   #1
Registered: Jul 2007
Posts: 52

Rep: Reputation: 15
problems compiling a fortran program on emacs

after trying to compil the program , from the menu on emacs,(#Tools/Compile..)
emacs asks :Compile command: make -k
I press enter and then i get the message

-*- mode: compilation; default-directory: "~/" -*-
Compilation started at Fri Aug 3 21:22:52

make -k
make: *** No targets specified and no makefile found. Stop.

Compilation exited abnormally with code 2 at Fri Aug 3 21:22:52

Must i define a makefile, or is it looking for it in a different directory?
Old 08-03-2007, 03:21 PM   #2
Registered: Sep 2005
Distribution: Slackware, Ubuntu, OS X
Posts: 58

Rep: Reputation: 15
Emacs compile command really does nothing to compile; make is a program to help compile stuff <i>when you have a makefile prepared.</i> Obviously you don't, so either a) open up a shell and manually enter your compilation commands, b) replace make -k in emacs with the same command, c) open a shell in emacs and compile, or d) write a makefile. You can find howtos of makefiles pretty easily.
Old 08-04-2007, 05:37 AM   #3
Registered: Jul 2007
Posts: 52

Original Poster
Rep: Reputation: 15
ok i downloaded gcc
and then i tried compiling through a shell comand : gcc ela.f
i get the following eror message:

/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
/tmp/ccioODX6.o: In function `MAIN__':
ela.f.text+0x21): undefined reference to `_gfortran_set_std'
ela.f.text+0x57): undefined reference to `_gfortran_st_write'
ela.f.text+0x75): undefined reference to `_gfortran_transfer_character'
ela.f.text+0x83): undefined reference to `_gfortran_st_write_done'
ela.f.text+0x8f): undefined reference to `_gfortran_stop_numeric'
collect2: ld returned 1 exit status
do ia need to configure something else?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling for fortran mperez Programming 4 05-28-2007 12:42 PM
Compiling Fortran program by g77 akillam Linux - Software 1 10-16-2006 05:02 AM
gui for a fortran program kooshball Programming 2 06-06-2005 08:37 AM
Problems compiling C program Boba Programming 3 08-28-2004 06:31 PM
why doesn't my fortran program compile?? himan Programming 1 04-11-2004 10:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration