LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problems compiling a fortran program on emacs (https://www.linuxquestions.org/questions/linux-newbie-8/problems-compiling-a-fortran-program-on-emacs-574542/)

Vassos 08-03-2007 01:27 PM

problems compiling a fortran program on emacs
 
emmm
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?

kuitang 08-03-2007 03:21 PM

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.

Vassos 08-04-2007 05:37 AM

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?


All times are GMT -5. The time now is 05:04 PM.