• 7333阅读
  • 3回复

如何在qt creator中编译包含stdio.h头文件的代码? [复制链接]

上一主题 下一主题
离线queen
 
只看楼主 倒序阅读 楼主  发表于: 2009-10-08
— 本帖被 XChinux 从 Qt for Linux/X11 移动到本区(2010-02-08) —
在哪个地方设置包含的路径呢?

离线dbzhang800

只看该作者 1楼 发表于: 2009-10-08
哪个地方都不用,直接 #include<stdio.h> ,
不过既然是C++,最好还是 #include <cstdio> 吧
离线queen
只看该作者 2楼 发表于: 2009-10-08
楼上的老大,不行呀!
我建了个工程,build,抱错如下:

Running build steps for project try...
Starting: C:/Qt/2009.02/qt/bin/qmake.exe C:/Users/Microsoft/Desktop/try/try.pro -spec win32-g++ -r
Exited with code 0.
Starting: C:/Qt/2009.02/mingw/bin/mingw32-make.exe -w
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Entering directory `C:/Users/Microsoft/Desktop/try'
C:/Qt/2009.02/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `C:/Users/Microsoft/Desktop/try'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -mthreads -Wl -o debug\try.exe debug/main.o -L"c:\Qt\2009.02\qt\lib"
mingw32-make.exe[1]: Leaving directory `C:/Users/Microsoft/Desktop/try'
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Leaving directory `C:/Users/Microsoft/Desktop/try'
C:/Qt/2009.02/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `WinMain@16'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug\try.exe] Error 1
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: *** [debug] Error 2
Exited with code 2.
Error while building project try
When executing build step 'Make'


我该怎么办?
离线queen
只看该作者 3楼 发表于: 2009-10-08
对不起,我搞错了!现在可以了!

是不用怎么设置,直接就行!
快速回复
限100 字节
 
上一个 下一个