Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [photran] How to set up Photran to work with gFortran

Hi,
 
Your assumption is right I run Photran under WinXP Pro SP3
 
I've dowloaded the gfrotran binaries from that location http://gcc.gnu.org/wiki/GFortranBinaries
Installed it under "C:\gfortran" directory
 
Presuming that set up progress is same with G95 compiler
 
Set both of enviromental variables PATH and LIBRARY_PATH to "C:\gfortran\bin;C:\gfortran\include;C:\gfortran\lib" (didn't avoid the redundancies)
 
Created the three type of program under the "Photran External Tool Configuration" to makfile,build and run
settings for them are as follows
MAKE FILE
location              : c:/mingw/bin/mkmf-g95.bat
working  directory :${container_loc}
arguments           :${project_name}
 
BUILD
location             :c:/msys/1.0/bin/make.exe
working  directory :${container_loc}
arguments            :all

RUN
location             :${container_loc}/${resource_name}
working  directory :${container_loc}
arguments          : 
 
makefile and batch file are obtained from net which were compatible with G95 compiler but have modified them to work with gfortran (not sure whether they are right or wrong but changed  variables FC = g95 to gfortran LD = gfortran FFLAGS = -I c:/mingw/include LDFLAGS = $(LIBS) # add your libraries after LIBS= , .g. -lblas #LIBS = c:/mingw/lib in g95_args.pl file
 
I called above three programs respectively to get it work. Creates the makefile fails at the build step
 
fortran -I c:/mingw/include  -c ./hello.f90
gfortran hello.o -o Simple_G 
C:/MinGW/lib/libgfortran.a(transfer.o): In function `sprintf':
c:/MinGW/include/stdio.h:266: undefined reference to `___mingw_vsprintf'
C:/MinGW/lib/libgfortran.a(main.o): In function `sprintf':
c:/MinGW/include/stdio.h:266: undefined reference to `___mingw_vsprintf'
C:/MinGW/lib/libgfortran.a(unix.o): In function `sprintf':
c:/MinGW/include/stdio.h:266: undefined reference to `___mingw_vsprintf'
C:/MinGW/lib/libgfortran.a(format.o): In function `sprintf':
c:/MinGW/include/stdio.h:266: undefined reference to `___mingw_vsprintf'
C:/MinGW/lib/libgfortran.a(list_read.o): In function `sprintf':
c:/MinGW/include/stdio.h:266: undefined reference to `___mingw_vsprintf'
C:/MinGW/lib/libgfortran.a(write.o):c:/MinGW/include/stdio.h:266: more undefined references to `___mingw_vsprintf' follow
collect2: ld returned 1 exit status
make: *** [Simple_G] Error 1
 
Looks like big mess isn't it? Dont even now MinGW and msys are required for gfortran, due to that reason I need top-down installation aproach.
 
>If you type "gfortran --version" in a "Command" window does it work ?
Not tested it yet, I suppose from command prompt you mean?

 
 
Regards,
 


Windows 7: Gündelik işlerinizi basitleştirin. Size en uygun bilgisayarı bulun.

Back to the top