haulm 发表于 2006-1-10 08:06:58

麻烦版主看下我的Q3.3编译环境哪有问题(已解决)

# g++ -lqt a.cpp
/usr/bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
#

/etc/profile:
PATH=$PATH:$QTDIR/bin
MANPATH=$QTDIR/man
LD_LIBRARY_PATH=$QTDIR/lib
LIBRARY_PATH=$QTDIR/lib
CPLUS_INCLUDE_PATH=$QTDIR/include
export MANPATH LD_LIBRARY_PATH LIBRARY_PATH PATH CPLUS_INCLUDE_PATH

(sorry,我把LIBRARY_PATH指到了$QTDIR/include里所以出错,上面已经是正确定义,加在/etc/profile就行了,谢谢楼下兄弟)

wall_john 发表于 2006-1-10 16:07:32

g++ -lqt-mt a.cpp
页: [1]
查看完整版本: 麻烦版主看下我的Q3.3编译环境哪有问题(已解决)