I am working within a tree that compiles fine on any Unix machine I throw it at, but Cygwin is being difficult and I’m not really sure where to start. I have the following directory structure:
buildwin/
|-- main.cpp
|-- other project files
|-- include/
|-- tclap
|-- CmdLine.h
|-- other files (including CmdLine.cpp)
|-- eigen
|-- (appropriate files)
|-- rapidxml
|-- (appropriate files)
When I try to compile this, I get the following error from g++:
$ g++ main.cpp -lglut32 -lglu32 -lopengl32 -Iinclude/eigen -Iinclude/rapidxml -Iinclude/tclap
main.cpp:6:27: fatal error: tclap/CmdLine.h: No such file or directory
compilation terminated.
I know it’s finding the other libraries (eigen and rapidxml) fine because if I remove the respective include flags, it throws an error saying that it can’t find eigen or what have you.
The include statement in question is:
// snip
#include <Eigen/StdVector>
#include <cmath>
#include <iostream>
#include <fstream>
#include <tclap/CmdLine.h>
// snip
Ideas? Thanks!
You’re specifying
-Iinclude/tclap, then includetclap/CmdLine.h, so the compiler goes hunting forinclude/tclap/tclap/CmdLine.h.Either use
-Iinclude, or includeCmdLine.hwithout the path.