Problem using GCC output in GNAT (Mingw system)
Hello,
this is my first post so I hope I'm doing it in the right forum but after checking the Programming forum I thought it's more about general programing questions.
Anyway, I'm new to Linux after programing on Visual Studio for years and I ran into quite some problems most of which I was able to solve but with this one I'm hitting a wall.
I installed Ubuntu13 64 recently and started to set up a development environment. Since I want to use it mostly for Ada I installed the GPS workbench from Ada core which comes with it's own version of the GCC toolset, I believe it is Mingw, at least on Windows it is, not sure if that's true on Linux as well.
Now my main interest is to develop console applications there, so I got the latest version of ncurses and did the usual ./configure make make install sequence and all went fine.
However now, when I make a simple hello world program in the GPS workbench (using the c++ compiler, no mixed language with Ada at all) I am getting this error message:
/usr/lib/libncurses.a: could not read symbols: File format not recognized
collect2: error: ld returned 1 exit status
So I guess that the compiler that comes with Adacore's GPS workbench is somehow not compatible with the standard gcc toolset that comes with Ubuntu?
Thanks for any help
PS I checked the compiler with gcc -v and it reports that it is the GNAT compiler so I guess there is no second toolset installed. I found some posts that pointed me in the direction of the archive manager ar and how to extract a file from it and test it with the file command and it turned out that the ncurses library is in 64 bit format, at least that's what I think, it says "ELF 64-bit, x86-64...". Perhaps that is the problem. But if it was compiled with the GCC that comes with Ada, why is it different when I make this library with make? When I check my test.o file that contains my hello world program it comes out as 32 bit. Is there a way to force the creation of a 32 bit library when I use make?
Last edited by DrVonBraun; 07-31-2013 at 07:57 AM.
|