문제

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