I am using the GNAT 3.15p Ada compiler which is suggested for RTRT. I was using GPS IDE with another version of the GNAT Ada compiler. Is there any IDE available for the GNAT 3.15p compiler? Can I use GPS IDE itself, if so how to change the compiler?
Thanks
Padmapriya
I believe that GPS will use the first gcc and gnatmake that it finds on the PATH.
Normally, installing GNAT on Windows will set up the PATH properly; if you already have a later GNAT+GPS installed, installing 3.15p should put itself first on the PATH.
The latest GPS you can find (e.g. GPS from GNAT GPL 2012) might support GNAT 3.15p (although the officially stated support only goes back as far as GNAT Pro 3.16a1). Look in the newer GPS manual for the "multiple toolchains" feature. This works very well for using a newer GNAT toolset with an older compiler. The "multiple toolchains" settings will override the OS path variable settings.
See http://docs.adacore.com/gps-docs/users_guide/_build/html/compilation.html#working-with-two-compilers
If you use gpr files you will probably have to restrict yourself to project file features that were available in GNAT 3.15p.
You might also have some luck with either GNATbench on Eclipse or AdaGIDE as alternate IDEs.
Related
My question is devided in two parts :
What is the best combination to execute MPI program in C language, when i searched for the necessary tools i found who work with Visual Studio and MS-MPI , and who work with Eclipse PTP or Code::Blocks and MPICH2 MPIOpen so i didn't know what to choose and what are tools that are compatible which other?
So ive installed OpenMPI,Eclipse PTP (Kepler) and MinGW-w64 to compile some C programs using MPI on windows 7 64Bits. i set all paths such as mpicc.exe i tried to test the Hello world program which is include with eclipse as example, i got this error:
13:03:48 **** Incremental Build of configuration Debug for project A ****
Info: Internal Builder is used for build
mpicc "-IC:\Program" Files "(x86)\OpenMPI_v1.6.2-x64\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\A.o" "..\src\A.c"
The Open MPI wrapper compiler was unable to find the specified compiler
cl.exe in your PATH.
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
13:03:48 Build Finished (took 115ms)
So i searched for cl.exe in my computer but i didn't found it, when i looked for some solution i found that the majority who solved this cl.exe problem are using visual studio, which is not my case so am little bit confused i dont want to switch to Visual Studio, so any solution with the tools that am using ?
OpenMPI does not appear to officially support MinGW as a backend: https://www.open-mpi.org/software/ompi/v1.6/ms-windows.php
The installers were configured with CMake 2.8.1 and compiled under Visual Studio 2010, and they support for C/C++ compilers of Visual Studio 2005, 2008 and 2010.
https://www.math.ucla.edu/~wotaoyin/windows_coding.html and other sources found on a search describe workflows using MS-MPI with MinGW. It may be a viable alternative. VSCode and MPI in WSL describes yet another non-paid but proprietary approach using VSCode with the WSL plugin.
I'm attempting to use Qt creator to cross-compile a project, but have an issue matching the Qt version and my specified compiler toolchain.
I have created a Kit setting up a Device, selecting my toolchain as the compiler (GCC ARM Linux in this case), but I only have a locally installed system Qt (5.0.2 on Mint x86).
Qt Creator understandably tells me the compiler cannot produce code for the Qt version; all the guides I have found suggest using a Qt compiled for the target platform. This doesn't make sense though - it attempts to run qmake compiled for a different architecture and fails
How do I install or configure/compile a Qt version to work with the cross compiler? Maybe I can modify my existing one to understand this setup?
Thanks
This makes absolutely sense. The advice to use a Qt, which is compiled for your target platform is correct. But this does not mean that you use a Qt that was compiled natively on that target platform. You need to use a Qt, which was compiled with a special cross compiler on your host platform for your target platform. This way qmake and other build tools remain executable on your host, but create configurations for your target.
So, if you have a compiler, which can create ARM code, use it to build your Qt. Then you can create a kit in QtCreator out of this compiler/Qt pair.
Greenflow is right. I would like to add some information. I have cross compiled Qt 5.4.1 on Windows having an ARM Linux as target platform. You just need to configure the build properly. Here's what I did:
./configure -platform win32-g++ -xplatform linux-arm-gnueabihf-g++ .....
So Qt tools (qmake,moc,etc...) were built as Windows binaries and all the libraries were built as Linux binaries. Check for the available platforms in qtbase/mkspecs.
I'm a big fan of StackOverflow because you always have answers for problems, and now is my chance to get advance of it Ö!
I'm trying to use a library which I got in the Internet, its OZCollide. Its suppossed to be crossplatform as it says in its website "Cross-platform, works on Windows, Linux and Macintosh, in fact any platform supporting VisualStudio 6/7 or gcc"
I got all the .h and .cpp, compile them with MinGW as objects (.o) and then link them all using ar. But the problem is when I include and use the library on my project (QT & MinGW) it throws "undefined reference".
I thought the problem could be that library examples only uses Visual Studio, so the library coulnd't be compiled for MinGW, but the website tells other story.
Thanks for your time!
EDIT: Okay I have managed to compile it and use it moving to another computer and compiling makefile. The only one difference is that Computer A had Cygwing and MinGW installed (with Cygwin set up in Windows path) and Computer B only had MinGW.
So I guess the problem was Makefile calling for g++ and Cygwin g++ got called instead of MinGW g++??
If I'm right, whats the difference between Cygwin and MinGW?
if you have experience with CMake, create your own CMakeLists file and import/link this libraries against your project. In this way, you can create projects for MinGW/MSVC/Linux/etc.
Here you'll find a good start with CMake http://www.cmake.org/cmake-tutorial/
Where to download the AUnit (AFAIK, the latest version is 3) for Ada (particularly for GNAT-4.9)?
I don't care whether this AUnit is licensed GPL or otherwise, because it is used only for my test program and the license of the test program does not matter.
I have a Debian system with gnat-4.9. The package libaunit2-dev does not install with this version of GNAT. And it seems that libaunit2-dev is AUnit 1 rather than AUnit 3. I would prefer the latest version.
Go to http://libre.adacore.com and select Download, Free Software, Build your download package, (any operating system)/GNAT GPL 2014, GNAT Ada GPL 2014, Sources, click on aunit-gpl-2014-src.tar.gz (not the checkbox, since you only want the one archive).
I’d recommend not running plain make install to install with the compiler, because AdaCore packages assume a different file structure from that used by Debian; in particular, gnatmake will not find aunit.gpr. Also, you may confuse apt-get. Install in ~/local instead by
make install INSTALL=$HOME/local
(yes, I know, it should be prefix not INSTALL but AdaCore aren’t all that consistent about this)
and then include $HOME/local/lib/gnat in your $ADA_PROJECT_PATH.
I'm experiencing some troubles with AdaGIDE compiler and its libraries. I installed GNAT 2013 and AdaGIDE 7.45 on Windows XP. When I'm trying to compile any code that requires win32 (eg. with win32.winnt;) AdaGIDE's console says file "win32.ads" not found.
I searched the web and I found this, followed the instructions, installed the win32 package, ran setpath.bat, I even tried copying libraries into every GNAT folder I found - but nothing works. When I copy win32.ads to the folder with my program it requires more libraries so I guess copying all of them into my program directory wouldn't be a very good idea either.
Does anyone know how to deal with this problem?
-- Edit --
I had a little chat with the creator of AdaGIDE and all I had to do was to set Compiler Options in Tools -> Project setting in current directory to:
-Ic:\GNAT\2012\include\win32ada -Ic:\gnat\2012\lib\win32ada\static
c:\GNAT\2012\include\win32ada is where I installed Win32Ada, you also have to make sure that in \static\ there is a file named libwin32ada.a.
Unfortunately it has to be repeated for every new project.
As I write, libre.adacore.com is only showing the 2012 (and 2011!) releases. I expect the 2013 release will be back in a day or so.
Looking at the 2012 release for x86-windows, I see the eleventh entry on the list is "Win32Ada 2012". I think the 2013 version of that is what you need.
You might be able to install the 2012 version of Win32Ada into your 2013 GNAT installation ... worth a try if you can't wait!
In any case, Win32Ada is provided in a way that expects you to use GNAT Project (.gpr) files. It comes with examples: if you look in C:\GNAT\2012\share\examples\win32ada, you'll find various example projects; I tried connect, double-clicked on connect.gpr, it fired up GPS, I said Build>Project>Build All and it built connect.exe.