LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 450|回复: 8

Kmplayer安装错误,请知道的朋友帮助,谢谢!

[复制链接]
发表于 2011-11-23 13:52:52 | 显示全部楼层 |阅读模式
linux-lg7b:/home/wing/kmplayer-0.11.3a # make
[  0%] Built target kdeinit_kmplayer_automoc
[  0%] Built target kmplayercommon_automoc
[ 67%] Built target kmplayercommon
[ 69%] Building CXX object src/CMakeFiles/kdeinit_kmplayer.dir/main.cpp.o
<command-line>:0:26: warning: missing terminating " character [enabled by default]
/home/wing/kmplayer-0.11.3a/src/main.cpp:36:13: error: stray ‘\’ in program
/home/wing/kmplayer-0.11.3a/src/main.cpp:36:13: error: missing terminating " character
/home/wing/kmplayer-0.11.3a/src/main.cpp: In function ‘int kdemain(int, char**)’:
/home/wing/kmplayer-0.11.3a/src/main.cpp:36:36: error: expected primary-expression before ‘,’ token
make[2]: *** [src/CMakeFiles/kdeinit_kmplayer.dir/main.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/kdeinit_kmplayer.dir/all] Error 2
make: *** [all] Error 2
发表于 2011-11-23 15:24:58 | 显示全部楼层
我这编译没有问题

你的36行是不是这个,
KMPLAYER_VERSION_STRING,

可能是这个宏没有正确检测到,grep KMPLAYER_VERSION_STRING * -R 看看

也可以试加个环境变量试试:
export CXXFLAGS="-DKMPLAYER_VERSION_STRING=\"0.11.3a\""

然后make
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-11-23 18:22:42 | 显示全部楼层
Post by liuguangzhao;2155752
我这编译没有问题

你的36行是不是这个,
KMPLAYER_VERSION_STRING,

可能是这个宏没有正确检测到,grep KMPLAYER_VERSION_STRING * -R 看看

也可以试加个环境变量试试:
export CXXFLAGS="-DKMPLAYER_VERSION_STRING=\"0.11.3a\""

然后make

谢谢你的回复! grep KMPLAYER_VERSION_STRING * -R后是这样,请问应该怎样做,加环境变量后再make错误依旧 。请问应该安装些什么包,及能否将你安装cmake的命令贴一下,谢谢!                                                                  linux-lg7b:/home/wing/kmplayer-0.11.3a # grep KMPLAYER_VERSION_STRING * -R
CMakeLists.txt:SET(KMPLAYER_VERSION_STRING
CMakeLists.txt~:SET(KMPLAYER_VERSION_STRING
src/CMakeFiles/kdeinit_kmplayer.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kdeinit_kmplayer.dir/flags.make:CXX_DEFINES = -Dkdeinit_kmplayer_EXPORTS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="\\\"0.11.3a\\\""
src/CMakeFiles/kmplayer.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kmplayer.dir/flags.make:CXX_DEFINES = -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="\\\"0.11.3a\\\""
src/CMakeFiles/kmplayerpart.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kmplayerpart.dir/flags.make:CXX_DEFINES = -DMAKE_KMPLAYERPART_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="\\\"0.11.3a\\\""
src/CMakeFiles/kmplayerpart_automoc.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kmplayercommon.dir/build.make:   cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/masteradaptor.moc /home/wing/kmplayer-0.11.3a/src/masteradaptor.h
src/CMakeFiles/kmplayercommon.dir/build.make:   cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/streammasteradaptor.moc /home/wing/kmplayer-0.11.3a/src/streammasteradaptor.h
src/CMakeFiles/kmplayercommon.dir/build.make:   cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/partadaptor.moc /home/wing/kmplayer-0.11.3a/src/partadaptor.h
src/CMakeFiles/kmplayercommon.dir/build.make:   cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/callbackadaptor.moc /home/wing/kmplayer-0.11.3a/src/callbackadaptor.h
src/CMakeFiles/kmplayercommon.dir/build.make:   cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/streamadaptor.moc /home/wing/kmplayer-0.11.3a/src/streamadaptor.h
src/CMakeFiles/kmplayercommon.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kmplayercommon.dir/flags.make:CXX_DEFINES = -DMAKE_KMPLAYERCOMMON_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="\\\"0.11.3a\\\""
src/CMakeFiles/kphononplayer_automoc.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kdeinit_kmplayer_automoc.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kmplayercommon_automoc.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/knpplayer.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/knpplayer.dir/flags.make:CXX_DEFINES = -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="\\\"0.11.3a\\\""
src/CMakeFiles/kphononplayer.dir/build.make:    cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/slaveadaptor.moc /home/wing/kmplayer-0.11.3a/src/slaveadaptor.h
src/CMakeFiles/kphononplayer.dir/build.make:    cd /home/wing/kmplayer-0.11.3a/src && /usr/bin/moc -I/usr/include -I/usr/include/KDE -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt4/mkspecs/default -I/home/wing/kmplayer-0.11.3a/src/.. -I/home/wing/kmplayer-0.11.3a/src -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="0.11.3a" -o /home/wing/kmplayer-0.11.3a/src/streamslaveadaptor.moc /home/wing/kmplayer-0.11.3a/src/streamslaveadaptor.h
src/CMakeFiles/kphononplayer.dir/DependInfo.cmake:  "KMPLAYER_VERSION_STRING=\\\"0.11.3a\\\""
src/CMakeFiles/kphononplayer.dir/flags.make:CXX_DEFINES = -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING="\\\"0.11.3a\\\""
src/kmplayerpart_automoc.cpp.files:_BSD_SOURCE;_XOPEN_SOURCE=500;_BSD_SOURCE;QT_NO_STL;QT_NO_CAST_TO_ASCII;_REENTRANT;KDE_DEPRECATED_WARNINGS;KDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10;QT_USE_FAST_CONCATENATION;QT_USE_FAST_OPERATOR_PLUS;QT3_SUPPORT;KDE3_SUPPORT;KMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kmplayerpart_automoc.cpp.files: -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\"0.11.3a\"
src/CMakeLists.txt:add_definitions(-DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\\"${KMPLAYER_VERSION_STRING}\\")
src/kphononplayer_automoc.cpp.files:_BSD_SOURCE;_XOPEN_SOURCE=500;_BSD_SOURCE;QT_NO_STL;QT_NO_CAST_TO_ASCII;_REENTRANT;KDE_DEPRECATED_WARNINGS;KDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10;QT_USE_FAST_CONCATENATION;QT_USE_FAST_OPERATOR_PLUS;QT3_SUPPORT;KDE3_SUPPORT;KMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kphononplayer_automoc.cpp.files: -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kmplayercommon_automoc.cpp.files:_BSD_SOURCE;_XOPEN_SOURCE=500;_BSD_SOURCE;QT_NO_STL;QT_NO_CAST_TO_ASCII;_REENTRANT;KDE_DEPRECATED_WARNINGS;KDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10;QT_USE_FAST_CONCATENATION;QT_USE_FAST_OPERATOR_PLUS;QT3_SUPPORT;KDE3_SUPPORT;KMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kmplayercommon_automoc.cpp.files: -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kmplayercommon_automoc.cpp:-D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kdeinit_kmplayer_automoc.cpp.files:_BSD_SOURCE;_XOPEN_SOURCE=500;_BSD_SOURCE;QT_NO_STL;QT_NO_CAST_TO_ASCII;_REENTRANT;KDE_DEPRECATED_WARNINGS;KDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10;QT_USE_FAST_CONCATENATION;QT_USE_FAST_OPERATOR_PLUS;QT3_SUPPORT;KDE3_SUPPORT;KMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kdeinit_kmplayer_automoc.cpp.files: -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\"0.11.3a\"
src/kdeinit_kmplayer_automoc.cpp:-D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=10 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT3_SUPPORT -DKDE3_SUPPORT -DKMPLAYER_VERSION_STRING=\"0.11.3a\"
src/main.cpp:            KMPLAYER_VERSION_STRING,
linux-lg7b:/home/wing/kmplayer-0.11.3a #
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-11-23 18:40:22 | 显示全部楼层
也贴上main.cpp请帮忙看看,谢谢!。/***************************************************************************
  main.cpp  -  description
  -------------------
begin                : Sat Dec  7 16:14:51 CET 2002
copyright            : (C) 2002 by Koos Vriezen
email                :
***************************************************************************/

/***************************************************************************
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
***************************************************************************/
#include <unistd.h>

#include "config-kmplayer.h"
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <klocale.h>
#include <kdemacros.h>
#include <kapplication.h>

#include <QPointer>
#include <qfileinfo.h>

#include "kmplayer.h"


extern "C" KDE_EXPORT int kdemain (int argc, char *argv[]) {
    setsid ();

    KAboutData aboutData ("kmplayer", 0, ki18n("KMPlayer"),
            KMPLAYER_VERSION_STRING,
            ki18n ("Media player."),
            KAboutData:icense_GPL,
            ki18n ("(c) 2002-2009, Koos Vriezen"),
            KLocalizedString(),
            I18N_NOOP ("http://kmplayer.kde.org"));
    aboutData.addAuthor(ki18n("Koos Vriezen"), ki18n("Maintainer"),"koos.vriezen@gmail.com");
    KCmdLineArgs::init (argc, argv, &aboutData);
    KCmdLineOptions options;
    options.add ("+[File]", ki18n ("file to open"));
    KCmdLineArgs::addCmdLineOptions (options);

    KMPlayer::Ids::init();

    KApplication app;
    QPointer <KMPlayerApp> kmplayer;

    if (app.isSessionRestored ()) {
        RESTORE (KMPlayerApp);
    } else {
        kmplayer = new KMPlayerApp ();
        kmplayer->show();

        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

        KUrl url;
        if (args->count () == 1)
            url = args->url (0);
        if (args->count () > 1)
            for (int i = 0; i < args->count (); i++) {
                KUrl url = args->url (i);
                if (url.url ().find ("://") < 0)
                    url = KUrl (QFileInfo (url.url ()).absFilePath ());
                if (url.isValid ())
                    kmplayer->addUrl (url);
            }
        kmplayer->openDocumentFile (url);
        args->clear ();
    }
    int retvalue = app.exec ();

    delete kmplayer;

    KMPlayer::Ids::reset();

    return retvalue;
}
回复 支持 反对

使用道具 举报

发表于 2011-11-23 20:40:35 | 显示全部楼层
应该是宏KMPLAYER_VERSION_STRING没有正确的扩展开,不知道为什么

把main.cpp中的这个宏手动替换为字符串"0.11.3a",这样应该能编译通过。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-11-23 22:21:50 | 显示全部楼层
Post by liuguangzhao;2155764
应该是宏KMPLAYER_VERSION_STRING没有正确的扩展开,不知道为什么

把main.cpp中的这个宏手动替换为字符串"0.11.3a",这样应该能编译通过。


谢谢!改成这样还是不行,/***************************************************************************
  main.cpp  -  description
  -------------------
begin                : Sat Dec  7 16:14:51 CET 2002
copyright            : (C) 2002 by Koos Vriezen
email                :
***************************************************************************/

/***************************************************************************
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
***************************************************************************/
#include <unistd.h>

#include "config-kmplayer.h"
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <klocale.h>
#include <kdemacros.h>
#include <kapplication.h>

#include <QPointer>
#include <qfileinfo.h>

#include "kmplayer.h"


extern "C" KDE_EXPORT int kdemain (int argc, char *argv[]) {
    setsid ();

    KAboutData aboutData ("kmplayer", 0, ki18n("KMPlayer"),
            "0.11.3a"
            ki18n ("Media player."),
            KAboutData:icense_GPL,
            ki18n ("(c) 2002-2009, Koos Vriezen"),
            KLocalizedString(),
            I18N_NOOP ("http://kmplayer.kde.org"));
    aboutData.addAuthor(ki18n("Koos Vriezen"), ki18n("Maintainer"),"koos.vriezen@gmail.com");
    KCmdLineArgs::init (argc, argv, &aboutData);
    KCmdLineOptions options;
    options.add ("+[File]", ki18n ("file to open"));
    KCmdLineArgs::addCmdLineOptions (options);

    KMPlayer::Ids::init();

    KApplication app;
    QPointer <KMPlayerApp> kmplayer;

    if (app.isSessionRestored ()) {
        RESTORE (KMPlayerApp);
    } else {
        kmplayer = new KMPlayerApp ();
        kmplayer->show();

        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

        KUrl url;
        if (args->count () == 1)
            url = args->url (0);
        if (args->count () > 1)
            for (int i = 0; i < args->count (); i++) {
                KUrl url = args->url (i);
                if (url.url ().find ("://") < 0)
                    url = KUrl (QFileInfo (url.url ()).absFilePath ());
                if (url.isValid ())
                    kmplayer->addUrl (url);
            }
        kmplayer->openDocumentFile (url);
        args->clear ();
    }
    int retvalue = app.exec ();

    delete kmplayer;

    KMPlayer::Ids::reset();

    return retvalue;
}
linux-lg7b:/home/wing/kmplayer-0.11.3a # make
[  0%] Built target kdeinit_kmplayer_automoc
[  0%] Built target kmplayercommon_automoc
[ 67%] Built target kmplayercommon
[ 69%] Building CXX object src/CMakeFiles/kdeinit_kmplayer.dir/main.cpp.o
<command-line>:0:26: warning: missing terminating " character [enabled by default]
/home/wing/kmplayer-0.11.3a/src/main.cpp:36:13: error: too many decimal points in number
make[2]: *** [src/CMakeFiles/kdeinit_kmplayer.dir/main.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/kdeinit_kmplayer.dir/all] Error 2
make: *** [all] Error 2
linux-lg7b:/home/wing/kmplayer-0.11.3a #
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-11-23 22:24:38 | 显示全部楼层
另外我的cmake是这样,请帮忙看看对不对!                                                        linux-lg7b:/tmp/kmplayer-build # cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=release /home/wing/kmplayer-0.11.3a
-- Found Qt-Version 4.7.4 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- Found KDE 4.7 include dir: /usr/include
-- Found KDE 4.7 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
have cairo cflags: ldflags:-lcairo
extra -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  libs -lcairo -pthread -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0
build npp
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wing/kmplayer-0.11.3a
回复 支持 反对

使用道具 举报

发表于 2011-11-23 22:31:08 | 显示全部楼层
36行改的没有逗号了,加上
"0.11.3a",

cmake 结果一致。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-11-24 04:35:41 | 显示全部楼层
Post by liuguangzhao;2155772
36行改的没有逗号了,加上
"0.11.3a",

cmake 结果一致。


谢谢你的帮助!已经通过,是版本问题,换0.11.2c安装成功。[ 98%] Built target pofiles                                                     
Scanning dependencies of target pofiles
[ 98%] Generating kmplayer.gmo                                                  
[100%] Built target pofiles                                                     
linux-lg7b:/home/wing/kmplayer-0.11.2c/build #
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表