开发者

Header file not found when building under cygwin

I am trying to build a certain library under cygwin (OpenEXR), and I get the following error:

b44ExpLogTable.cpp:52:18: error: half.h: No such file or directory

half.h is referenced using #include <half.h>, and is actually a part of another library I successfully run make/make install on previously.

The question is -- when using #include with <>, where the preprocessor expects to find the specified file?

(I have just found it in /u开发者_如何转开发sr/local/include/OpenEXR, but I have no idea why preprocessor cannot).

Update: I have also found:

Makefile

ILMBASE_CXXFLAGS = -I/usr/local/include/OpenEXR

Makefile.am

INCLUDES = @ILMBASE_CXXFLAGS@ \
       -I$(top_builddir)  \
       -I$(top_srcdir)/config

This actually decreased my understanding of what the problem may be.

Update 2: So, by redefining some variables in makefile I found out that instead of $(CXXCOMPILE) make seems to run $(CXX) $(CXXFLAGS), with CXXFLAGS being just -g -O2. Ok, I have no idea how it manages to run $(CXX) $(CXXFLAGS) if this combination in not used anywhere in the makefile except in $(CXXCOMPILE) which is not run. I can add my -I to CXXFLAGS but I have a feeling that a lot more additions will be required, so I would prefer to find a root cause of the problem.

(I am not sure whether it is a Super User or Stack Overflow question, because my developer skills in C++/Linux are almost non-existent.)


Additional include directories are usually specified in CPPFLAGS. Try running ./configure CPPFLAGS=-I/usr/local/include/OpenEXR and re-running make.


You need to somehow get -I/usr/local/include/OpenEXR added to the compiler command line. That might be a simple matter of doing:

CFLAGS=-I/usr/local/include/OpenEXR make
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜