我正在为mingw-gcc构建开放式的
$ yaourt -S mingw-w64-openal
并出现语法错误:
[ 38%] Building C object CMakeFiles/OpenAL32.dir/Alc/alcConfig.c.obj
In file included from /tmp/yaourt-tmp-hacked/aur-mingw-w64-openal/src/openal-soft-1.16.0/Alc/alcConfig.c:36:0:
/usr/i686-w64-mingw32/include/shlobj.h:37:3: error: unknown type name ‘EXTERN_C’
SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags,
^
/usr/i686-w64-mingw32/include/shlobj.h:37:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘HRESULT’
SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags,
^
/usr/i686-w64-mingw32/include/shlobj.h:37:3: error: unknown type name ‘HRESULT’
CMakeFiles/OpenAL32.dir/build.make:463: recipe for target 'CMakeFiles/OpenAL32.dir/Alc/alcConfig.c.obj' failed
make[2]: *** [CMakeFiles/OpenAL32.dir/Alc/alcConfig.c.obj] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/OpenAL32.dir/all' failed
make[1]: *** [CMakeFiles/OpenAL32.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
我在第37行查看了这个shlobj.h
,发现了这个:
typedef enum {
SHGFP_TYPE_CURRENT = 0,
SHGFP_TYPE_DEFAULT = 1,
} SHGFP_TYPE;
SHFOLDERAPI SHGetFolderPathW (HWND hwnd, int csidl, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath);
我不是C中的专业人士,但似乎}
位于枚举区内,所以我试图尽可能地修复它,但没有成功。
答案 0 :(得分:0)
检查一下 - http://sourceforge.net/p/mingw-w64/bugs/476