我已经配置了我的 rcssmonitor 并且当我想要制作文件时它出现此错误有人可以帮我吗?
配置日志:
./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for cos in -lm... yes
checking for deflate in -lz... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for int16_t... yes
checking for int32_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for error_at_line... yes
checking for memset... yes
checking for rint... yes
checking for strtol... yes
checking for pow... yes
checking for sqrt... yes
checking for boostlib >= 1.32.0... yes
checking build system type... x86_64-unknown-linux-gnu
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: set QT4_REQUIRED_VERSION... 4.3.0
configure: set QT4_REQUIRED_MODULES... QtCore QtGui QtNetwork
checking for pkg-config... /usr/bin/pkg-config
configure: check QtCore >= 4.3.0
checking for Qt4... yes
configure: check QtGui >= 4.3.0
checking for Qt4... yes
configure: check QtNetwork >= 4.3.0
checking for Qt4... yes
configure: set QT4_CXXFLAGS... -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4/QtCore
configure: set QT4_LDFLAGS... -L/usr/X11R6/lib64
configure: set QT4_LDADD... -pthread-lQtGui -lQtCore -lfontconfig -lpthread -laudio -lXt -lgthread-2.0 -lglib-2.0 -lpng -lz -lfreetype -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXi -lXrender -lfontconfig -lfreetype -lXext -lX11 -lm -lQtNetwork -lQtCore -lfontconfig -lpthread -lz -lQtCore -lfontconfig -lpthread -lz -lm -ldl -lgthread-2.0 -lglib-2.0 -lrt
configure: set QT4_MOC... /usr/share/qt4/bin/moc
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
犯错误:
g++-5.real: error: unrecognized command line option ‘-pthread-lQtGui’
Makefile:357: recipe for target 'rcssmonitor' failed
make[2]: *** [rcssmonitor] Error 1
make[2]: Leaving directory '/home/seena/Robocup/rcssmonitor-15.1.1/src'
Makefile:289: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/seena/Robocup/rcssmonitor-15.1.1'
Makefile:229: recipe for target 'all' failed
make: *** [all] Error 2
我正在运行 ubuntu 16 有人可以帮我解决我的问题吗?
答案1
您需要将标志-pthread
和分开。我设法通过使用找到标志在一起的位置并在进行配置过程后将其分开来-lQtGui
解决这个问题。执行然后尝试这样做:sed
make clean
./configure
sed -i 's/-pthread-lQtGui/-pthread -lQtGui/' config.status*
sed -i 's/-pthread-lQtGui/-pthread -lQtGui/' Makefile*
之后做一个sudo make install
,看看它是否有效。
答案2
打开配置文件并找到此行:
QT4_LDADD="$($PKG_CONFIG --static --libs-only-other $QT4_REQUIRED_MODULES)$($PKG_CONFIG --static --libs-only-l $QT4_REQUIRED_MODULES)"
在 $PKG_CONFIG 变量之间放置一个空格,因此它将是这样的:
QT4_LDADD="$($PKG_CONFIG --static --libs-only-other $QT4_REQUIRED_MODULES) $($PKG_CONFIG --static --libs-only-l $QT4_REQUIRED_MODULES)"