Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不大会玩,没运行起来 #6

Open
CN-GodHei opened this issue Jun 12, 2021 · 2 comments
Open

不大会玩,没运行起来 #6

CN-GodHei opened this issue Jun 12, 2021 · 2 comments

Comments

@CN-GodHei
Copy link

qsvunpack.c:152:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i = 0; i < qheader.nb_indices; ++i) {

@btnkij
Copy link
Owner

btnkij commented Jun 13, 2021

根据错误提示,你的编译器可能默认使用了旧的C语言标准,需要在编译命令里手动设置C99或C11标准。
如使用以下编译命令

gcc qsvunpack.c -o qsvunpack.exe -O2 -std=c11

qsvformat.c和qsvunpack.c文件仅供研究转码原理,代码的编译可能依赖于特定的环境。如果继续出现其他错误,可以百度错误提示,按照网上的方法修改代码或编译命令。

完整的、带图形界面的转码程序正在开发中,会提供编译好的release版本。(i hate qt. it took me more time to design ui than algorithm😫)

以下是我的编译器版本,供参考

Using built-in specs.
COLLECT_GCC=D:\dev\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=d:/dev/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)

@basicbh
Copy link

basicbh commented May 10, 2022

楼主你用什么编译的,我是qt7,打开pro直接执行的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants