I've been having this issue where I've installed the GNAT (x86 windows 2017) on my other machine, and I suddenly have these errors, Error: no native compiler found for language 'ada', default runtime and no languages defined for this project. All of this is under the .gpr file of my project. This never happened to me on the other PC.
Related
I have had a try at using Gnat Studio with the Alire package manager. Launching Gnat Studio using the 'alr edit' command is causing Gnat Studio to crash. I have had a look at the log file and there are several .dll files causing exceptions. The file entries are like this:
[PROJECTS.EXCEPTIONS] Unexpected exception: raised CONSTRAINT_ERROR : gnatcoll-projects.adb:5729 index check failed _PROJECTS.EXCEPTIONS_ [C:\GNATSTUDIO\bin\gps.libgnatcoll\libgnatcoll.dll] _PROJECTS.EXCEPTIONS_ 0x7ffc78dcecb8 ??? at ???
Gnat Studio opens in an 'inconsistent state' and crashes.
Regards
Mike
I also had problems using alire with GNAT Studio.
GNAT Studio seems to need some environment variables set by alire
to be available at project startup.
I found a GNAT plugin that automatically sets those on project start, but
I had to adapt it to work for alire 1.1.x.
My version is on GitHub at https://github.com/mhatzl/gps_alire.
Close GNAT Studio and copy the python file of the repo inside .gnatstudio/plug-ins, which should be located in your user directory.
After that, GNAT Studio should be able to setup everything needed from alire if you open your .gpr file.
Note: This works for me on Windows 10.
I have VS2019 and you may or may not remember I had massive troubles with GNAT 2021 working a little while ago. I have been running my Ada programs from the GCC command line using GNATMAKE and everything has been working fine.
A few days ago a friend of mine told me their is an extension to use Ada within VS 2019. So - I checked it out, downloaded and installed it. Everything seems to be working, I can make a new Ada project just like I used to in GNAT 2021. I set the path : C:\GNAT\2018\bin : as the path variable. The problem comes when I go to compile my test code. It, for some reason, cannot find the GNAT toolchain and compiler. It has read that I have GPS 2018 installed, I know this because when I hover my arrow over the code in the IDE - it shows the location.
package Ada.Text_IO
C:\GNAT\2018\lib\gcc\x86_64-pc-mingw32\7.3.1\adainclude\
I do not understand how the compiler cannot find the toolchain yet intellisense clearly can. There is hardly any documentation about the extension online at all, and all the download page has is very scant setup info, which just refers to settng the path, which I have done correctly. Here is the actual compiler error message.
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
Has anyone here managed to use this extension successfully and get a program to compile? If I compile the same code using GPS 2018 it works without any errors. Any help on working out how the set the toolchain/compiler paths in VS would be really helpful.
Thank you guys.
Skyla x
EDIT
Hey thank you for the comment - I ran the command from the commandline tool within the VS2019 IDE and it asked me to select the compiler I wanted to use, which I did. i entered S to save the selection and it seemed to have displayed what you said in your comment. Do I have to C/P this anywhere?
Sorry I do not know much about config settings. I generally just plug in and go. Here is what I got.
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
I installed GNAT Community edition on Windows and I'm trying to write Ada code, compile it and flash it to STM32 Nucleo.
I started by compiling "hello world" project and compiler works fine, but when I opened an example project for STM32 from the AdaCore/Ada_Drivers_Library (Github) and tried to Build it I got the "No compiler for language "Ada" error.
The path to the compiler is in the envrironment variables.
In the GNAT Studio in Settings the "Compiler Path" and "Tools Path" have the same path, which is C:\GNAT\2020\bin and I checked the "Use the compiler in tools path to generate cross-reference files".
NOTE: in the installation proccess of AdaCore/Ada_Drivers_Library one installation step failed, it was the "python ./scripts/install_dependencies.py". I'm not sure if that's the problem.
Any help appreciated.
I created a application in linux and now I am trying to import this application to windows which is 64-bit. I installed Qt creator(64-bit) and imported the project.I am using certain libraries like omniORB4 which are built on 64-bit.Now when I try to build the application I get the following error:
module machine type 'x64' conflicts with target machine type 'x86'
Qt Version : Qt 5.3.1 (MSVC 2013, 64 bit)
Visual Studio :2010
When I imported the project in Qt on windows there was a option to configure the project and it showed only " Microsoft Visual C++ Compiler 10.0(x86)" in the options. I think I am getting this error because my compiler is x86. there are few other compilers which are shown in Project Properties but when I select them it gives me a error. Is there any way that I can change my compiler to x64 in QT and what are the other options that I can follow to resolve this issue. I looked into many links but still no luck.
I would like to write an application for Windows CE. I have already followed all the relevant steps, and started to write the application with Qt Creator.
However, when I started to build the code, there was the following error message:
QtCored4.lib(QtCored4.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
Maybe some more details:
I downloaded the library for Windows CE and I configured Qt-Opensource-Version 4.8.3 with following parameters:
configure -platform win32-msvc2008 -xplatform wince50standard-armv4i-msvc2008
All went well. Qt Creator did recognize the new version and added Windows CE as supported platform.
Now, I guess, that there will be the same problem with QtGuid4.lib. Does anybody know, where I get a compatible file?
The import library for a DLL - the .LIB file - contains machine code stubs that are linked into your program, that call through the import table for the EXE. Therefore, they have to match the processor family that you're compiling for.
You need to obtain the .lib file for the Windows CE ARMv4I build of QtCored4.dll. Try these instructions for building Qt for Windows CE.