小编MrD*_*ver的帖子

QT5 和 Antlr4.8 无法使用 Cmake 和 QT Creator 编译

如上所示,我尝试使用 cmake 在 QT Creator 中编译 QT5 项目,并希望添加 antlr 包。

信息:Qt 5.12.8,Antlr 4.8,尝试过的编译器:mingw gcc|g++,msvc 2015,2017 系统:Windows / Linux 都不起作用

为了包含 Antlr 4.8,我使用提供的 CPP 包从源代码构建 Antlr

这是我正在从事的项目。 https://github.com/MrDiver/ArmSimulator/tree/ArmParser/src/asmeditor/AsmEditor

我将antlr4包含在以下https://github.com/MrDiver/ArmSimulator/blob/ArmParser/src/asmeditor/AsmEditor/CMakeLists.txt#L14-L21

通常当我用它编译一些东西时它工作得很好。但是这次当我尝试包含 antlr 的头文件时,我收到此错误消息

FAILED: CMakeFiles/AsmEditor.dir/managers/processormanager.cpp.obj 
H:\Programme\QT\Tools\mingw730_64\bin\g++.exe  -DANTLR4CPP_STATIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -I. -IH:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor -IAsmEditor_autogen/include -Iantlr4_runtime/src/antlr4_runtime/runtime/Cpp/runtime/src -IH:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/armparser/assembler -IH:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/armparser/walker -IH:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/codearea -IH:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/managers -IH:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/armparser -isystem H:/Programme/QT/5.12.8/mingw73_64/include -isystem H:/Programme/QT/5.12.8/mingw73_64/include/QtWidgets -isystem H:/Programme/QT/5.12.8/mingw73_64/include/QtGui -isystem H:/Programme/QT/5.12.8/mingw73_64/include/QtANGLE -isystem H:/Programme/QT/5.12.8/mingw73_64/include/QtCore -isystem H:/Programme/QT/5.12.8/mingw73_64/./mkspecs/win32-g++ -O3 -DNDEBUG   -std=gnu++11 -MD -MT CMakeFiles/AsmEditor.dir/managers/processormanager.cpp.obj -MF CMakeFiles\AsmEditor.dir\managers\processormanager.cpp.obj.d -o CMakeFiles/AsmEditor.dir/managers/processormanager.cpp.obj -c H:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/managers/processormanager.cpp
In file included from antlr4_runtime/src/antlr4_runtime/runtime/Cpp/runtime/src/antlr4-runtime.h:31:0,
                 from H:/MyStuff/PrivateProjects/CPPProjects/ArmSimulator/src/asmeditor/AsmEditor/managers/processormanager.cpp:2: …
Run Code Online (Sandbox Code Playgroud)

c++ qt cmake antlr4

3
推荐指数
1
解决办法
431
查看次数

Latex Tikz/Pgf 使用参数声明形状并使用数字声明锚点

我正在 pgf 中编写一些形状,我并不真正了解其工作原理,但我设法阅读了文档。

\pgfdeclareshape{reg}{
  % The 'minimum width' and 'minimum height' keys, not the content, determine
  % the size
  \savedanchor\northeast{%
    \pgfmathsetlength\pgf@x{\pgfshapeminwidth}%
    \pgfmathsetlength\pgf@y{\pgfshapeminheight}%
    \pgf@x=0.11\pgf@x
    \pgf@y=0.15\pgf@y
  }
  % This is redundant, but makes some things easier:
  \savedanchor\southwest{%
    \pgfmathsetlength\pgf@x{\pgfshapeminwidth}%
    \pgfmathsetlength\pgf@y{\pgfshapeminheight}%
    \pgf@x=-0.11\pgf@x
    \pgf@y=-0.15\pgf@y
  }
  % Inherit from rectangle
  \inheritanchorborder[from=rectangle]

  % Define same anchor a normal rectangle has
  \anchor{center}{\pgfpointorigin}
  \anchor{north}{\northeast \pgf@x=0pt}
  \anchor{east}{\northeast \pgf@y=0pt}
  \anchor{south}{\southwest \pgf@x=0pt}
  \anchor{west}{\southwest \pgf@y=0pt}
  \anchor{north east}{\northeast}
  \anchor{north west}{\northeast \pgf@x=-\pgf@x}
  \anchor{south west}{\southwest}
  \anchor{south east}{\southwest \pgf@x=-\pgf@x}
  \anchor{text}{
    \pgfpointorigin
    \advance\pgf@x by -.5\wd\pgfnodeparttextbox%
    \advance\pgf@y by -.5\ht\pgfnodeparttextbox% …
Run Code Online (Sandbox Code Playgroud)

parameters latex tikz pgf

3
推荐指数
1
解决办法
3599
查看次数

标签 统计

antlr4 ×1

c++ ×1

cmake ×1

latex ×1

parameters ×1

pgf ×1

qt ×1

tikz ×1