我遇到SAPI问题:在编译代码时,我在CodeBlocks中遇到这个错误:
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
obj\Debug\main.o||In function `main':|
C:\Documents and Settings\Mert\Desktop\yazi\okuproje\main.c|11|undefined reference to `CoInitialize@4'|
C:\Documents and Settings\Mert\Desktop\yazi\okuproje\main.c|14|undefined reference to `CoCreateInstance@20'|
C:\Documents and Settings\Mert\Desktop\yazi\okuproje\main.c|29|undefined reference to `CoUninitialize@0'|
||=== Build finished: 3 errors, 1 warnings ===|
答案 0 :(得分:0)
您没有提到您使用CodeBlocks(或更重要的是,哪个链接器)使用哪个编译器,但是,您所获得的错误是由于缺少库而引起的。
您需要添加对uuid.lib
的引用(以获取IID_ISpVoice
的GUID定义)和ole32.lib
(以获取CoInitialize
的定义,{ {1}}和CoCreateInstance
)。