Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying a source install (configure, make) on FreeBSD but I get this error:

error: foo.h: No such file or directory

although the file does exist at /usr/local/include/foo.h so I guess the compiler is not looking in /usr/local/include .

How do I make it do so:

LDFLAGS="-L/usr/local/include"

CFLAGS="-I/usr/local/include"

LDFLAGS="-L/usr/local/include"

haven't helped. (The install works works fine on OS 10.7 Tiger)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Take a look at C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables:

export C_INCLUDE_PATH=/usr/local/include/:${C_INCLUDE_PATH}
export CPLUS_INCLUDE_PATH=/usr/local/include/:${CPLUS_INCLUDE_PATH}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.