我有 VS2019,你可能会或可能不记得我有巨大的麻烦与 GNAT 2021 工作前一段时间。我一直在使用 GNATMAKE 从 GCC 命令行运行我的 Ada 程序,一切都很好。
几天前我的一个朋友告诉我他们的是在 VS 2019 中使用 Ada 箭头的扩展。所以-我检查了它,下载并安装了它。一切似乎都在工作,我可以像以前在 GNAT 2021 中一样做一个新的 Ada 项目。我设置路径:C:\ GNAT\ 2018\ bin:作为路径变量。当我去编译我的测试代码时,问题来了-我有 GNtoolAT 链
package Ada.Text_IO
C:\GNAT\2018\lib\gcc\x86_64-pc-mingw32\7.3.1\adainclude\
我不明白编译器如何无法找到工具链但智能感知显然可以。几乎没有任何关于在线扩展的文档,所有的下载页面都是非常稀少的设置信息,它只是指设置路径,我已经正确完成。这是实际的编译器错误消息。
Build started...
1>------ Build started: Project: test, Configuration: Debug x64 ------
1>gprconfig: can't find a toolchain for the following configuration:
1>gprconfig: language 'ada', target 'C:\GNAT\2018\bin', default runtime
1>test.gpr:12:09: no compiler for language "Ada", cannot compile "test.adb"
1>gprbuild: *** compilation phase failed
这里有人设法成功使用这个扩展并获得一个程序来编译吗?如果我使用 GPS 2018 编译相同的代码,它的工作原理没有任何错误。关于如何在 VS 中设置工具链 / 编译器路径的任何帮助将是非常有帮助的。
谢谢你们.
斯凯拉 x
编辑
嘿,谢谢你的评论-我从 VS2019 IDE 中的命令行工具运行命令,它要求我选择我想要使用的编译器,我做了。我输入 S 保存选择,它似乎显示了你在评论中所说的话。
对不起,我不太了解配置设置。我一般只是插上电源。这是我得到的。
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
* 1. GNAT for Ada in c:\gnat\2018\bin\ version 2018 (default runtime)
3. GCC-ASM for Asm in c:\gnat\2018\bin\ version 7.3.1
4. GCC-ASM for Asm in c:\gnat\2018\bin\ version 7.3.1
5. GCC-ASM for Asm2 in c:\gnat\2018\bin\ version 7.3.1
6. GCC-ASM for Asm2 in c:\gnat\2018\bin\ version 7.3.1
7. GCC-ASM for Asm_Cpp in c:\gnat\2018\bin\ version 7.3.1
8. GCC-ASM for Asm_Cpp in c:\gnat\2018\bin\ version 7.3.1
9. GCC for C in c:\gnat\2018\bin\ version 7.3.1
10. GCC for C in c:\gnat\2018\bin\ version 7.3.1
11. G++ for C++ in c:\gnat\2018\bin\ version 7.3.1
12. WINDRES for WinRes in c:\gnat\2018\bin\ version 2.28.51.20170529
Select or unselect the following compiler (or "s" to save): s
You can regenerate the same config file in batch mode
with the following command line:
gprconfig --batch --target=x86_64-pc-mingw32 --config=Ada,2018,default,c:\gnat\2018\bin\,GNAT
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(15条)