an error occurred when 'make'
icc -c -Wall -std=c11 -I cafe -I libtree -I libcommon -fopenmp -O3 -DNDEBUG -o release/cafe_family.o cafe/cafe_family.c cafe/cafe_family.c(188): error: expected an expression for (int i = 0; i < pcf->num_species; i++) ^
cafe/cafe_family.c(188): error: identifier "i" is undefined for (int i = 0; i < pcf->num_species; i++) ^
cafe/cafe_family.c(214): error: expected an expression for (int i = 0; i< ptree->nlist->size; i++) { ^
cafe/cafe_family.c(214): error: identifier "i" is undefined for (int i = 0; i< ptree->nlist->size; i++) { ^
cafe/cafe_family.c(229): error: expected an expression for (int i = 0 ; i < pcf->num_species ; i++ ) ^
compilation aborted for cafe/cafe_family.c (code 2) make: *** [release/cafe_family.o] Error 2
This problem happens when I make the source codes of v4.2 and v4.2.1.
I’m not sure how you got your std flag to be c11, but it should be c++11. The error indicates that a very old language compatibility is being used – C89 I believe.
-- Ben Fulton Indiana University
From: whoisleehom [email protected] Sent: Wednesday, July 22, 2020 6:23 AM To: hahnlab/CAFE [email protected] Cc: Subscribed [email protected] Subject: [hahnlab/CAFE] an error occurred when 'make' (#83)
icc -c -Wall -std=c11 -I cafe -I libtree -I libcommon -fopenmp -O3 -DNDEBUG -o release/cafe_family.o cafe/cafe_family.c cafe/cafe_family.c(188): error: expected an expression for (int i = 0; i < pcf->num_species; i++) ^
cafe/cafe_family.c(188): error: identifier "i" is undefined for (int i = 0; i < pcf->num_species; i++) ^
cafe/cafe_family.c(214): error: expected an expression for (int i = 0; i< ptree->nlist->size; i++) { ^
cafe/cafe_family.c(214): error: identifier "i" is undefined for (int i = 0; i< ptree->nlist->size; i++) { ^
cafe/cafe_family.c(229): error: expected an expression for (int i = 0 ; i < pcf->num_species ; i++ ) ^
compilation aborted for cafe/cafe_family.c (code 2) make: *** [release/cafe_family.o] Error 2
This problem happens when I make the source codes of v4.2 and v4.2.1.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/hahnlab/CAFE/issues/83, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAALIMAYMSKKXGOA6BB5MLLR424ZJANCNFSM4PER3A4Q.
I’m not sure how you got your std flag to be c11, but it should be c++11. The error indicates that a very old language compatibility is being used – C89 I believe. … -- Ben Fulton Indiana University From: whoisleehom [email protected] Sent: Wednesday, July 22, 2020 6:23 AM To: hahnlab/CAFE [email protected] Cc: Subscribed [email protected] Subject: [hahnlab/CAFE] an error occurred when 'make' (#83) icc -c -Wall -std=c11 -I cafe -I libtree -I libcommon -fopenmp -O3 -DNDEBUG -o release/cafe_family.o cafe/cafe_family.c cafe/cafe_family.c(188): error: expected an expression for (int i = 0; i < pcf->num_species; i++) ^ cafe/cafe_family.c(188): error: identifier "i" is undefined for (int i = 0; i < pcf->num_species; i++) ^ cafe/cafe_family.c(214): error: expected an expression for (int i = 0; i< ptree->nlist->size; i++) { ^ cafe/cafe_family.c(214): error: identifier "i" is undefined for (int i = 0; i< ptree->nlist->size; i++) { ^ cafe/cafe_family.c(229): error: expected an expression for (int i = 0 ; i < pcf->num_species ; i++ ) ^ compilation aborted for cafe/cafe_family.c (code 2) make: *** [release/cafe_family.o] Error 2 This problem happens when I make the source codes of v4.2 and v4.2.1. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#83>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAALIMAYMSKKXGOA6BB5MLLR424ZJANCNFSM4PER3A4Q.
There are two lines in my Makefile: CFLAGS = -Wall -std=c11 $(INCLUDE) -fopenmp CXXFLAGS = -Wall -std=c++11 $(INCLUDE) -fopenmp
Is there anything wrong with it?
I just meet this problem. How did you resolve it? Thanks
I changed gcc version from 4.47 to 5.22 by adding export C_INCLUDE_PATH=$C_INCLUDE_PATH:/public/software/gcc-5.2.0/include export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/public/software/gcc-5.2.0/include export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/software/gcc-5.2.0/lib64:/public/software/gcc-5.2.0/mpc-0.8.1/lib:/public/software/gcc-5.2.0/l$ export LIBRARY_PATH=$LIBRARY_PATH:/public/software/gcc-5.2.0/lib64:/public/software/gcc-5.2.0/mpc-0.8.1/lib:/public/software/gcc-5.2.0/lib:/pu$ export PATH=/public/software/gcc-5.2.0/bin:$PATH
to my path
It still does not work.
make, then showed the same message as above.
What is the output of
$ gcc --version $ gcc -c -Wall -std=c11 -I cafe -I libtree -I libcommon -fopenmp -O3 -DNDEBUG -o release/cafe_family.o cafe/cafe_family.c
?