使用Qt5.4安装Netanim 3.106

目的:使用Qt5.4来编译Netanim 3.106

OS: Centos6.6

编译步骤:

1 从qt.io下载社区版在线版本qt,并在线安装。

2 在1中会默认安装Qt5到 /opt/Qt目录

2.1

[root@gdc1000 bin]# ln -s /opt/Qt/5.4/gcc_64/bin/qmake
ln: creating symbolic link `./qmake': File exists
[root@gdc1000 bin]# rm qmake
rm: remove symbolic link `qmake'? y
[root@gdc1000 bin]# ln -s /opt/Qt/5.4/gcc_64/bin/qmake
[root@gdc1000 bin]# rm qmake-qt4
rm: remove symbolic link `qmake-qt4'? y
[root@gdc1000 bin]# qmake --version
QMake version 3.0
Using Qt version 5.4.2 in /opt/Qt/5.4/gcc_64/lib
[root@gdc1000 bin]#


3 编译netanim

hg clone http://code.nsnam.org/netanim

cd netanim
make clean
[root@gdc1000 netanim]# /opt/Qt/5.4/gcc_64/bin/qmake NetAnim.pro
make

此时make会使用Qt5.4,而非Centos原来的Qt4.6.2
部分结果
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Iqtpropertybrowser/src -I/opt/Qt/5.4/gcc_64/include -I/opt/Qt/5.4/gcc_64/include/QtPrintSupport -I/opt/Qt/5.4/gcc_64/include/QtWidgets -I/opt/Qt/5.4/gcc_64/include/QtGui -I/opt/Qt/5.4/gcc_64/include/QtCore -I. -I/opt/Qt/5.4/gcc_64/mkspecs/linux-g++ -o moc_qcustomplot.o moc_qcustomplot.cpp
g++ -Wl,-O1 -Wl,-rpath,/opt/Qt/5.4/gcc_64 -Wl,-rpath,/opt/Qt/5.4/gcc_64/lib -o NetAnim main.o log.o fatal-error.o fatal-impl.o logqt.o resizeableitem.o animnode.o animatorscene.o animpacket.o netanim.o animatormode.o mode.o animxmlparser.o animatorview.o animlink.o animresource.o statsview.o statsmode.o routingxmlparser.o routingstatsscene.o interfacestatsscene.o flowmonxmlparser.o flowmonstatsscene.o textbubble.o qtvariantproperty.o qttreepropertybrowser.o qtpropertymanager.o qtpropertybrowserutils.o qtpropertybrowser.o qtgroupboxpropertybrowser.o qteditorfactory.o qtbuttonpropertybrowser.o animpropertybrowser.o filepathmanager.o fileeditfactory.o fileedit.o packetsmode.o packetsview.o packetsscene.o graphpacket.o table.o countertablesscene.o qcustomplot.o qrc_resources.o qrc_qtpropertybrowser.o moc_animatorscene.o moc_animpacket.o moc_netanim.o moc_animatormode.o moc_statsmode.o moc_qtpropertybrowserutils_p.o moc_animpropertybrowser.o moc_filepathmanager.o moc_fileeditfactory.o moc_fileedit.o moc_packetsmode.o moc_table.o moc_qcustomplot.o   -L/opt/Qt/5.4/gcc_64/lib -lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 


你可能感兴趣的:(使用Qt5.4安装Netanim 3.106)