• 7254阅读
  • 4回复

[提问]请教,如何将QT程序编绎成CGI文件? [复制链接]

上一主题 下一主题
离线xtowx
 
只看楼主 倒序阅读 楼主  发表于: 2011-02-18
我使用的编绎命令为:
arm-linux-gcc -o main.cgi main.c

编绎的时候老是找不到相应的库文件,我应该怎么配置呢?
离线wxj120bw

只看该作者 1楼 发表于: 2011-02-18
如果编译qt程序,制定下头文件(-I)和库的路径(-L),最好写个Makefile文件,不至于每次编译都要写很长的命令
离线xtowx
只看该作者 2楼 发表于: 2011-02-18
arm-linux-gcc -o main.cgi main.cpp -L/usr/local/Trolltech/QtEmbeedded-4.6.3-arm/lib -I/usr/local/Trolltech/QtEmbeedded-4.6.3-arm/include -I/usr/local/Trolltech/QtEmbeedded-4.6.3-arm/include/QtCore

我按照楼上所说的,加入了库和头文件的路径,但报错信息成为了
/temp/cc90B1c6.o:In function 'main':
main.cpp:(.text+0x8c): undefined reference to `QTextStream::QTextStream(__STDIO_FILE_STRUCT*, QFlags<QIODevice::OpenModeFlag>)'
main.cpp:(.text+0xa4): undefined reference to `QTextStream::setAutoDetectUnicode(bool)'
main.cpp:(.text+0xb4): undefined reference to `QTextStream::operator<<(int)'
main.cpp:(.text+0xd0): undefined reference to `QTextStream::~QTextStream()'
main.cpp:(.text+0x104): undefined reference to `QTextStream::~QTextStream()'
main.cpp:(.text+0x138): undefined reference to `__gxx_personality_sj0'
collect2: ld returned 1 exit status
是不是我配置的还是不对?还是哪里有问题?
离线novesky

只看该作者 3楼 发表于: 2011-02-19
加 -lQtCore
离线xtowx
只看该作者 4楼 发表于: 2011-02-21
arm-linux-gcc -o main.cgi main.cpp -I/usr/local/Trolltech/QtEmbeedded-4.6.3-arm/include -I/usr/local/Trolltech/QtEmbeedded-4.6.3-arm/include/QtCore  -L/usr/local/Trolltech/QtEmbeedded-4.6.3-arm/lib -lQtCore
我已经能够编绎成功了,但在运行后,BOA会提示cgi_header: unable to find LFLF
是不是QT编绎的不能用?有没有谁运行成功的?
快速回复
限100 字节
 
上一个 下一个