当前位置: 首页 > news >正文

在msys2里面编译antlr4的过程记录

简单记录一下如何在msys2里面的mingw64里面编译antlr4 runtime

第一步:下载压缩包
https://github.com/antlr/antlr4/releases第二步:解压缩第三步:打开msys64 mingw64控制台第四步:cd d:\xxx\xxx 打开cpp运行时目录第五步:mkdir build   ,cd build第六步:这玩意需要联网下载一个谷歌的什么测试的东西,设置好联网代理export http_proxy=代理地址
export https_proxy=代理地址第七步:cmake .. -G "MSYS Makefiles" \-DCMAKE_INSTALL_PREFIX=/mingw64 \-DBUILD_SHARED_LIBS=OFF \-DCMAKE_BUILD_TYPE=Release
-- Building without demo. To enable demo build use: -DWITH_DEMO=True
CMake Warning (dev) at D:/msys64/mingw64/share/cmake/Modules/FetchContent.cmake:1373 (message):The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 isnot set.  The policy's OLD behavior will be used.  When using a URLdownload, the timestamps of extracted files should preferably be that ofthe time of extraction, otherwise code that depends on the extractedcontents might not be rebuilt if the URL changes.  The OLD behaviorpreserves the timestamps from the archive instead, but this is usually notwhat you want.  Update your project to the NEW behavior or specify theDOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid thisrobustness issue.
Call Stack (most recent call first):runtime/CMakeLists.txt:71 (FetchContent_Declare)
This warning is for project developers.  Use -Wno-dev to suppress it.CMake Deprecation Warning at build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):Compatibility with CMake < 3.10 will be removed from a future version ofCMake.Update the VERSION argument <min> value.  Or, use the <min>...<max> syntaxto tell CMake that the project requires at least <min> but has been updatedto work with policies introduced by <max> or earlier.CMake Deprecation Warning at build/_deps/googletest-src/googlemock/CMakeLists.txt:45 (cmake_minimum_required):Compatibility with CMake < 3.10 will be removed from a future version ofCMake.Update the VERSION argument <min> value.  Or, use the <min>...<max> syntaxto tell CMake that the project requires at least <min> but has been updatedto work with policies introduced by <max> or earlier.CMake Deprecation Warning at build/_deps/googletest-src/googletest/CMakeLists.txt:56 (cmake_minimum_required):Compatibility with CMake < 3.10 will be removed from a future version ofCMake.Update the VERSION argument <min> value.  Or, use the <min>...<max> syntaxto tell CMake that the project requires at least <min> but has been updatedto work with policies introduced by <max> or earlier.-- Found Python: D:/msys64/mingw64/bin/python3.12.exe (found version "3.12.9") found components: Interpreter
-- Configuring done (12.1s)
-- Generating done (0.4s)
-- Build files have been written to: D:/xxxxx/libs/antlr4_312/build

   出来done就可以make了

  make -j 8

[ 97%] Building CXX object runtime/CMakeFiles/antlr4_static.dir/src/tree/xpath/XPathTokenElement.cpp.obj
[ 97%] Building CXX object runtime/CMakeFiles/antlr4_static.dir/src/tree/xpath/XPathWildcardAnywhereElement.cpp.obj
[ 98%] Building CXX object runtime/CMakeFiles/antlr4_static.dir/src/tree/xpath/XPathWildcardElement.cpp.obj
[ 99%] Linking CXX shared library libantlr4-runtime.dll
[ 99%] Linking CXX static library libantlr4-runtime-static.a
[ 99%] Built target antlr4_shared
[ 99%] Built target antlr4_static
[ 99%] Building CXX object runtime/CMakeFiles/antlr4_tests.dir/tests/Utf8Test.cpp.obj
[100%] Linking CXX executable antlr4_tests.exe
[100%] Built target antlr4_tests

  这就编译出来了。

 make install就可以了

相关文章:

  • 《软件设计师》复习笔记(12.1)——范围管理、进度管理
  • 美信监控易告警:功能强大
  • 深度学习总结(21)
  • device_fingerprint、device_id、hmac生成
  • 2d深度预测
  • MQ基础篇
  • 深度学习3.1 线性回归
  • 前端基础之《Vue(6)—组件基础(2)》
  • 1.Linux基础指令
  • MATLAB 控制系统设计与仿真 - 37
  • Linux:命令行参数、环境变量
  • [经验总结]Linux双机双网卡Keepalived高可用配置及验证细节
  • 大数据赋能,全面提升‘企业服务平台’实际效能!
  • 浏览器的存储机制 - Storage
  • NO.97十六届蓝桥杯备战|数论板块-最大公约数和最小公倍数|欧几里得算法|秦九韶算法|小红的gcd(C++)
  • 爬虫学习——Scrapy
  • Java编程语言 1.打印数组元素 2.Student类 StudentTest类
  • 【go】什么是Go语言中的GC,作用是什么?调优,sync.Pool优化,逃逸分析演示
  • alertManager部署安装、告警规则配置详解及告警消息推送
  • 华为openEuler操作系统全解析:起源、特性与生态对比
  • 纪念沈渭滨︱沈渭滨先生与新修《清史》
  • 习近平致电祝贺诺沃亚当选连任厄瓜多尔总统
  • 又有多地推进产科整合
  • 世界读书日|南京图书馆开了首个网络文学主题阅读空间
  • 市民建议公交广播增加“请勿大声喧哗”提示,上海交通委回复
  • 海外考古大家访谈|马克·波拉德:以考古意识为本位的科技考古学家