Question

I'm just trying to compile a c++ program using the emulated g++ compiler in Cygwin on a Windows 7 machine that has the following includes:

iostream
string
windows.h
stdio.h
mmsystem.h
initguid.h
objbase.h
objerror.h
ole2ver.h
speech.h

It compiles them all fine with the exception of speech.h, which is sort of the bread and butter of what I'm working on, soo.. yeah.

Returns the following:

test.cpp:11:20: fatal error: speech.h: No such file or directory compilation terminated.

Any and all help will be much appreciated.

Était-ce utile?

La solution

The files that do compile are on your system path, so the compiler can find them. speech.h isn't, so you have to tell it where to look:

g++ -c test.cpp -I<Path_to_speech.h>/speech.h ...

I.e. if it's in C:\Users\Kirk\test\include, then

g++ -c test.cpp -IC:/Users/Kirk/test/include/speech.h ...
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top