質問

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.

役に立ちましたか?

解決

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 ...
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top