osg3.2.0+Qt5.5.0+VS2010的编译问题
来源:互联网 发布:tensorflow图像识别 编辑:程序博客网 时间:2024/04/28 05:14
2>------ Build started: Project: osgQt, Configuration: Debug x64 ------
2>Build started 2014/1/27 21:06:43.
2>InitializeBuildStatus:
2> Touching "osgQt.dir\Debug\osgQt.unsuccessfulbuild".
2>CustomBuild:
2> Building Custom Rule D:/OpenSource/OSG/OpenSceneGraph-3.2.0/src/osgQt/CMakeLists.txt
2> CMake does not need to re-run because D:\OpenSource\OSG\OpenSceneGraph-3.2.0\build\src\osgQt\CMakeFiles\generate.stamp is up-to-date.
2> Generating __/__/include/osgQt/moc_QGraphicsViewAdapter.cpp
2> moc: Too many input files specified
2> Usage: D:\OpenSource\qt\qt5.2.0\5.2.0\msvc2012_64\bin\moc.exe [options] [header-file] [@option-file]
2> Qt Meta Object Compiler version 67 (Qt 5.2.0)
2>
2> Options:
2> -?, -h, --help Displays this help.
2> -v, --version Displays version information.
2> -o <file> Write output to file rather than stdout.
2> -I <dir> Add dir to the include path for header files.
2> -F <framework> Add Mac framework to the include path for header fil
2> es.
2> -E Preprocess only; do not generate meta object code.
2> -D <macro[=def]> Define macro, with optional definition.
2> -U <macro> Undefine macro.
2> -M <key=value> Add key/value pair to plugin meta data
2> -i Do not generate an #include statement.
2> -p <path> Path prefix for included file.
2> -f <file> Force #include [optional <file>] (overwrite default)
2> .
2> -b <file> Prepend #include <file> (preserve default include).
2> -n <which> Do not display notes (-nn) or warnings (-nw). Compat
2> ibility option.
2> --no-notes Do not display notes.
2> --no-warnings Do not display warnings (implies --no-notes).
2> --ignore-option-clashes Ignore all options that conflict with compilers, lik
2> e -pthread conflicting with moc's -p option.
2>
2> Arguments:
2> [header-file] Header file to read from, otherwise stdin.
2> [@option-file] Read additional options from option-file.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 1.
请问有人遇到过这个情况么?
这个我解决了,额 也布吉岛算不解决 命令行运行qt/bin目录 下的moc ,moc QGraphicsViewAdapter ,然后cmd框内会出现4个函数 还有一堆头文件 把这些copy到osg源文件的QGraphicsViewAdapter.cpp中。 第二 打开/src/osgQt/CMakeLists.txt 定位moc,我现在没这个文件 不知道是哪行 大概就是要运行moc的那句 给屏蔽掉 这样就可以了 编译吧。
(也可以先做第二步,屏蔽掉后直接编译会发现有4个无法识别的函数,然后你会惊奇的发现正是第一步中生成的那四个函数。cmake中用moc本来是要generate出moc_QGraphicsViewAdapter.cpp的,但是不知道是不是写法不正确,所以提示2> moc: Too many input files specified moc指定过多文件)
可能说的不太清楚 自己研究一下哈。
有了更简单的解决方法后通知一下下。嘿嘿
刚刚看了一下 是这么写的
IF ( Qt5Widgets_FOUND )
QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-fosgQt/QGraphicsViewAdapter" )
ELSE()
QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
你的是不是这么写的:
IF ( Qt5Widgets_FOUND )
QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
ELSE()
QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
改成上面那种写法试试,还不行的话就 用我说的方法吧,加个“#”屏蔽掉,或者直接删掉
IF ( Qt5Widgets_FOUND )
# QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
ELSE()
QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
转载地址:http://bbs.osgchina.org/forum.php?mod=viewthread&tid=13202&_dsign=89e9e15a
- osg3.2.0+Qt5.5.0+VS2010的编译问题
- osg3.2.1+vs2010++QT5.4.2+win7 64编译方法
- QT5.4.1+VS2012+OSG3.2.3+osgearth2.7编译问题总结
- osg3.4.0+Qt5.5.0 vs2013 64位编译成功
- VS2010+Qt5+OSG3.0开发环境搭建
- VS2010+Qt5+OSG3.0开发环境搭建
- Qt5.3.1+OSG3.2.1+VS2010配置记录
- vs2013+osg3.4+qt5.6.2编译过程
- vs2013+osg3.4+qt5.6.2编译过程
- vs2013+osg3.4+qt5.6.2编译过程
- osg3.2.1+vs2010+win7编译方法
- OSG3.5.1 + Qt5.4.2 + VS2010 + CMake3.4.3 安装说明
- vs2013编译osg3.4.0(64位)和Qt5.6.2(vs2013_64)的小demo
- osg3.2+qt5.5.1+vs2010按照网上流程搭建环境时遇到问题,很苦恼直到看到这篇文章
- vs2010编译Qt5.0
- OSG+QT5+vs2010编译
- OSG+QT5+vs2010编译
- VS2010+64+OSG3.2.1之二OpenThreads编译
- javaday46_IO流6_字节流与设备录入
- Hdu 5618 CDQ分治
- PAT-1021
- 欢迎使用CSDN-markdown编辑器
- Hash表与素数
- osg3.2.0+Qt5.5.0+VS2010的编译问题
- 题目1032:ZOJ
- 2017 金科校春季赛 神奇的幻方
- Python解决中文乱码问题
- MongoDB 批量添加记录中不存在的字段
- PAT-1023
- OnPreferenceChangeListener与OnPreferenceClickListener的分析
- 05:吃糖果
- 面向对象