-1

I changedbison -v -d ...To bison -d ... In makefile in codeblocks.but when compile nothing has been changed and shows error. use Code::Block 16.01 so I get this error:

   -------------- Build: Debug in testB (compiler: GNU GCC Compiler)---------------

 bison -v -d C:\Users\admin\Downloads\Compressed\f90toC\f90toC\f90.y -o C:\Users\admin\Downloads\Compressed\f90toC\f90toC/f90.parser.cc
Execution of 'bison -v -d C:\Users\admin\Downloads\Compressed\f90toC\f90toC\f90.y -o C:\Users\admin\Downloads\Compressed\f90toC\f90toC/f90.parser.cc' in 'D:\testB\testB' failed.

 -------------- Run: Debug in testB (compiler: GNU GCC Compiler)---------------

 Checking for existence: D:\testB\testB\bin\Debug\testB.exe

my Makefile is here:

CC = gcc  -ggdb
OBJ = f90main.o f90decl.o f90arg.o f90.tab.o lex.yy.o symb.o ptree.o \
      f90mod.o f90print.o

.c.o:
    $(CC) -c $<

all: f90

lex.yy.c:  f90.lex
    flex -i f90.lex

f90.tab.c: f90.y f90.h
    bison -d f90.y

f90: $(OBJ) f90.h
    $(CC) -o ff90 $(OBJ)

why:
    bison -d -v f90.y
clean:
    -rm *.o lex.yy.c f90.tab.c f90.tab.h f90.output

F = f90toC
tar:
    tar -cvf f90toC-test.tar $(F)/f90.lex $(F)/f90.y $(F)/*.h $(F)/*.c $(F)/tests $(F)/doc $(F)/Makefile $(F)/README $(F)/File_index

bak:
    cp *.c backup
    cp *.h backup
    cp *.y backup
    cp *.lex backup
    cp Makefile backup

CodeBlocks snapshot 1

also you can refer to want to compile product Fortran to c So anybody could help me.

Can I build my project in visual studio 2015 as https://msdn.microsoft.com/en-us/library/txcwa2xx.aspx Is it compatible makefile project?

Regards

hasanbaghal
  • 25
  • 2
  • 8
  • Are you sure the makefile is used for the build? It contains relative paths only, but the execution log you shows absolute paths. – Florian Weimer Jul 18 '17 at 16:26
  • I am sure,This is the routine behavior of codeblocks.Actually in codeblocks when you create a temp project and add files ,it sorted files in specified categories. Specially makefile you can open it.but I don't know why it doesn't change makefile when I edit that, and also problem in compilation appears. – hasanbaghal Jul 18 '17 at 16:39
  • That does not seem to be related to C, so don't spam tags. `.cc` is not typical for C code either, but C++. – too honest for this site Jul 18 '17 at 17:40

1 Answers1

0

My problem solved as I follow instruction in

How to compile LEX/YACC files on Windows?

and use this project

http://www.ncsa.illinois.edu/People/mdewing/f90toC/

and make the project in command prompt.Not Visual Studio 2015 environment so I use ff90.exe to compile fortran .f90 files to .c files as the instruction mentioned .but the ff90.exe is not really strong and take errors in such tests.this is related to the developer

John Crone
  • 34
  • 1
  • 7