don't know where is the catch...

B

Bad_Kid

I have cpp 7.1; created a new w32 console aplication project; added existing
items to that project - one .h file (xyz.h) and one .c file; (the files are
not in project's directory)
xyz.h file is set under "header files" and
..c file is set under "source files"

- in that .c file I have:

#include <stdio.h>
#include <math.h>
#include "xyz.h"

and when compilling I always get an error:

Cannot open include file: 'portaudio.h': No such file or directory

why???
 
B

Bob Hairgrove

I have cpp 7.1; created a new w32 console aplication project; added existing
items to that project - one .h file (xyz.h) and one .c file; (the files are
not in project's directory)
xyz.h file is set under "header files" and
.c file is set under "source files"

- in that .c file I have:

#include <stdio.h>
#include <math.h>
#include "xyz.h"

and when compilling I always get an error:

Cannot open include file: 'portaudio.h': No such file or directory

why???

It's pretty simple: your compiler cannot find that file.

Check the documentation for your compiler as to the compiler option or
command-line switch you should use to add additional include
directories (usually /I or -I on the command line).
 
I

IWP506

Bob said:
It's pretty simple: your compiler cannot find that file.

Check the documentation for your compiler as to the compiler option or
command-line switch you should use to add additional include
directories (usually /I or -I on the command line).

My guess is that one of your header files is trying to include that,
but can't find it. Do a search for that file with Windows search, then
if it's found copy it to your include directory, or specify that path
on the command line. If it's not found, Google it and download it, or
find an open source program or something that contains it, then copy it
out of there.

(e-mail address removed)
 
B

Bad_Kid

sorry, when compilling it says:

Cannot open include file: 'xyz.h': No such file or directory

and that file I just added to a project???
 
J

John Harrison

Bad_Kid said:
sorry, when compilling it says:

Cannot open include file: 'xyz.h': No such file or directory

and that file I just added to a project???

You should realise that you are asking a question about how to use your
compiler, not about the C++ language. This group is really for the C++
language, and in any case most people are going to have trouble
answering your question because they don't know your compiler.

The best place to look is your compiler documentation. The issue of
where header files are looked for is a common issue and you compiler
documentaiton is *bound* to discuss it. Clearly for you compiler just
'adding it to the project' isn't sufficient (that doesn't surprise me, I
think that would be true of most compilers), but some other option will
to the trick.

John
 
J

John Harrison

John said:
You should realise that you are asking a question about how to use your
compiler, not about the C++ language. This group is really for the C++
language, and in any case most people are going to have trouble
answering your question because they don't know your compiler.

The best place to look is your compiler documentation. The issue of
where header files are looked for is a common issue and you compiler
documentaiton is *bound* to discuss it. Clearly for you compiler just
'adding it to the project' isn't sufficient (that doesn't surprise me, I
think that would be true of most compilers), but some other option will
to the trick.

John

I just realised that by cpp 7.1 you probably mean the MS 7.1 compiler.
If that is the case then here's a hint. Right click on the project icon,
in the solution explorer, select Properties. Select the C++/General item
on the left hand side. Enter any include directories you want to be
searched where it says 'Additional Include Directories'

John
 
B

Bad_Kid

thanks!

John Harrison said:
I just realised that by cpp 7.1 you probably mean the MS 7.1 compiler.
If that is the case then here's a hint. Right click on the project icon,
in the solution explorer, select Properties. Select the C++/General item
on the left hand side. Enter any include directories you want to be
searched where it says 'Additional Include Directories'

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top