PathFinder icon indicating copy to clipboard operation
PathFinder copied to clipboard

Installation error

Open Almonfrey opened this issue 8 years ago • 5 comments

Hi, I got this error in the installation process, can someone help?

./../src/PathFinder.h:73:38: error: expected expression std::vectorTAlgorithm::node_type* path; ^ ./../src/PathFinder.h:73:40: error: C++ requires a type specifier for all declarations std::vectorTAlgorithm::node_type* path;

Almonfrey avatar Aug 12 '17 16:08 Almonfrey

You're missing angle brackets in the error messages (std::vectorTAlgorithm::node_type*), is that a formatting error ?

Sahnvour avatar Aug 12 '17 19:08 Sahnvour

No, the complete error message is that:

In file included from image.cpp:24: ./../src/PathFinder.h:73:38: error: expected expression std::vectorTAlgorithm::node_type* path; ^ ./../src/PathFinder.h:73:40: error: C++ requires a type specifier for all declarations std::vectorTAlgorithm::node_type* path; ^~~~ 2 errors generated.

I'm using this makefile:

all: image

image: Node.o Dijkstra.o AStar.o image.o g++ -std=c++14 Node.o Dijkstra.o AStar.o image.o -o image

image.o: image.cpp clang-3.5 -c -std=c++14 image.cpp

Dijkstra.o: ../src/Dijkstra.cpp g++ -c -std=c++14 ../src/Dijkstra.cpp

AStar.o: ../src/AStar.cpp g++ -c -std=c++14 ../src/AStar.cpp

Node.o: ../src/Node.cpp g++ -c -std=c++14 ../src/Node.cpp

clean: rm *o image

Almonfrey avatar Aug 12 '17 19:08 Almonfrey

To me the error messages seem suspicious, the mentionned line should be std::vector<TAlgorithm::node_type*>, can you check that your copy of src/PathFinder.h is OK ?

Sahnvour avatar Aug 12 '17 19:08 Sahnvour

It is like the type TAlgorithm::node_type* was not being identified... The file is ok...

Almonfrey avatar Aug 12 '17 19:08 Almonfrey

Hi, @Sahnvour , could you please try to install it inside nwtgck/llvm-clang:3.2 docker image? In this image there is the clang3-2, but I couldn't build the image.cpp...

One of the problems was: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_algobase.h:59:10: fatal error: 'bits/c++config.h' file not found

I have used the following makefile:

all: program

program: Node.o Dijkstra.o AStar.o image.o g++ -std=c++11 Node.o Dijkstra.o AStar.o image.o -o program

image.o: image.cpp clang-3.2 -std=gnu++11 -stdlib=libstdc++ image.cpp

Dijkstra.o: ../src/Dijkstra.cpp g++ -c -std=c++11 ../src/Dijkstra.cpp

AStar.o: ../src/AStar.cpp g++ -c -std=c++11 ../src/AStar.cpp

Node.o: ../src/Node.cpp g++ -c -std=c++11 ../src/Node.cpp

clean: rm *o image

Almonfrey avatar Aug 12 '17 20:08 Almonfrey