【问题标题】:DLL project : migrating from Qt + MinGW to Visual StudioDLL 项目:从 Qt + MinGW 迁移到 Visual Studio
【发布时间】:2017-02-06 07:50:27
【问题描述】:

我正在制作一个 DLL,用 Qt Creator 用 C++ 编写(但里面没有 Qt 的东西,纯自制的 C++),并使用标准的 qmake + MinGW/g++ 构建过程。我的朋友正在做框架/主软件,他正在使用 Visual Studio Express 2015,他应该在其中使用我的 DLL。因此,我想在 Qt Creator 中为我的项目使用相同的 Visual Studio 编译器。

所以我注意到 Qt Creator 已经自动检测到 Visual Studio C++ 14 编译器,我相信它是附加到 Visual Studio Express 2015 的编译器。当我使用该编译器创建一个工具包并将我的项目设置为使用该工具包进行编译时,我得到一个建议的“制作”步骤,它在我的 Qt Creator 安装的 bin 文件夹中调用 jom。我不知道这是什么,我得到以下输出(见下文)。

我不知道从这里做什么。我还尝试直接从我的 Visual Studio 安装中的 nmake 可执行文件创建一个编译器,然后使用它——但我得到一个非常相似的错误,即“-”未被识别为选项。非常感谢任何提示!

12:56:27: Starting: "C:\Qt\qtcreator-3.1.1\bin\jom.exe" 
Usage: jom @commandfile
       jom [options] [/f makefile] [macro definitions] [targets]

nmake compatible options:
/A build all targets
/D display build information
/E override environment variable macros
/F <filename> use the specified makefile
/G display included makefiles
/H show help
/I ignore all exit codes
/K keep going - build unrelated targets on error
/N dry run - just print commands
/NOLOGO do not print logo
/P print makefile info
/R ignore predefined rules and macros
/S silent mode
/U print content of inline files
/L same as /NOLOGO
/W print the working directory before and after other processing
/X <filename> write stderr to file.
/Y disable batch mode inference rules

jom only options:
/DUMPGRAPH show the generated dependency graph
/DUMPGRAPHDOT dump dependency graph in dot format
/J <n> use up to n processes in parallel
/KEEPTEMPFILES keep all temporary files
/VERSION print version and exit
Error: unknown command line option '-' in arguments: '/L-j4'
12:56:27: The process "C:\Qt\qtcreator-3.1.1\bin\jom.exe" exited with code 128.
Error while building/deploying project Ford_DAT_framework_DLL_as_plugin (kit: MVS Ford)
When executing step 'Make'
12:56:27: Elapsed time: 00:04.

【问题讨论】:

    标签: dll visual-studio-2015 qt-creator


    【解决方案1】:

    所以我使用 qmake -tpvc 生成了一个 VCproj 文件,该文件几乎立即在我朋友使用的 Visual Studio Express 2015 中编译。我想那是我的问题的有效解决方案!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-12-29
      • 2017-07-03
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 2017-09-22
      • 2018-08-01
      相关资源
      最近更新 更多