From: colvert@ro.com (Paul Colvert)
Subject: SGI GNAT Question? (Long)
Date: 1999/03/02
Date: 1999-03-02T00:00:00+00:00 [thread overview]
Message-ID: <7bflkk$78i$1@news.ro.com> (raw)
Greetings All!
I have something of a mystery happening when using the GNAT Ada
compiler (GNAT 3.11p) on a SGI Onyx. I was hoping that someone out
there could enlighten me with this issue. I am sorry if this letter is
somewhat long, but it was the best that I could do. Thanks.
I have a simulation written in Ada95 that I am trying to build. My
source code directory looks something like this:
src/
....common/
...........common_files.ads
...........common_files.adb
....models/
...........model_1/
...................model_1.ads
...................model_1.adb
...........model_2/
...................model_2.ads
...................model_2.adb
...........model_3/
...................model_3.ads
...................model_3.adb
....linklib/
............main_program_1.adb
............main_program_2.adb
After successfully compiling the "common" source directory using this
command:
gcc -c -g -O0 -n32 /the.absolute.path/filename
and each of the "models" source directories using this command:
gcc -c -g -O0 -n32 -I/src/common /the.absolute.path/filename
I successfully compile two different "mains" in the "linklib" source
directory using this command:
gcc -c -g -O0 -n32 \
-I/src/common \
-I/src/models/model_1 \
-I/src/models/model_2 \
-I/src/models/model_3 \
/the.absolute.path/filename
At this point, I was able to bind and link the first "main" using the
following commands:
gnatbind -A -n32 \
-I/src/common \
-I/src/models/model_1 \
-I/src/models/model_2 \
-I/src/models/model_3 \
-I/src/linklib \
main_program_1.ali
gnatlink -A -n32 -o main_program_1 main_program_1.ali
But when I try to do the same thing with the second "main" using the
same commands, the gnatlink command errors out saying that it could not
find the file "common_files.ads". This appeared to be some kind of path
problem. After some man page reading, I defined two environment
variables, ADA_INCLUDE_PATH and ADA_OBJECTS_PATH, as this:
ADA_INCLUDE_PATH=\
/src/linklib:\
/src/models/model_1:\
/src/models/model_2:\
/src/models/model_3:\
/src/common
ADA_OBJECTS_PATH=\
/src/linklib:\
/src/models/model_1:\
/src/models/model_2:\
/src/models/model_3:\
/src/common
Now, I am able to successfully bind and link both programs using the
following commands:
gnatbind -A -n32 main_program_1.ali
gnatlink -A -n32 -o main_program_1 main_program_1.ali
and
gnatbind -A -n32 main_program_2.ali
gnatlink -A -n32 -o main_program_2 main_program_2.ali
Can anyone tell me why first method would work for one "main" but not
the other? I know I can use the environment variable method, but I am
really puzzled about the first method. Any help that could be offered
would be greatly appreciated. Thanks!
P.S. For those who may not know, the "-n32" option is a SGI specific
ABI (Application Binary Interface).
--
Paul Colvert
colvert@ro.com
next reply other threads:[~1999-03-02 0:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-02 0:00 Paul Colvert [this message]
1999-03-02 0:00 ` SGI GNAT Question? (Long) Gautier
1999-03-02 0:00 ` dewar
1999-03-03 0:00 ` Paul Colvert
1999-03-03 0:00 ` robert_dewar
1999-03-04 0:00 ` SpamSpamSpam
1999-03-04 0:00 ` dewar
1999-03-05 0:00 ` SpamSpamSpam
1999-03-05 0:00 ` dennison
1999-03-05 0:00 ` dewar
1999-03-07 0:00 ` root
1999-03-07 0:00 ` dewar
1999-03-08 0:00 ` Marin David Condic
1999-03-05 0:00 ` dewar
1999-03-05 0:00 ` dennison
1999-03-05 0:00 ` robert_dewar
1999-03-07 0:00 ` root
1999-03-07 0:00 ` David Botton
1999-03-07 0:00 ` robert_dewar
1999-03-07 0:00 ` dewar
1999-03-08 0:00 ` root
1999-03-09 0:00 ` Some GNAT history (was Re: SGI GNAT Question? (Long)) dewar
1999-03-09 0:00 ` dennison
1999-03-09 0:00 ` robert_dewar
1999-03-09 0:00 ` Tom Moran
1999-03-11 0:00 ` Arthur Evans Jr
1999-03-11 0:00 ` dennison
1999-03-09 0:00 ` SGI GNAT Question? (Long) dewar
1999-03-10 0:00 ` SpamSpamSpam
1999-03-10 0:00 ` robert_dewar
1999-03-10 0:00 ` Chris Morgan
1999-03-10 0:00 ` dewar
1999-03-10 0:00 ` Chris Morgan
1999-03-10 0:00 ` dewar
1999-03-05 0:00 ` bourguet
1999-03-05 0:00 ` dennison
1999-03-05 0:00 ` dewar
1999-03-05 0:00 ` GNAT Field Test scope (was SGI GNAT Question) Larry Kilgallen
1999-03-04 0:00 ` SGI GNAT Question? (Long) dennison
1999-03-02 0:00 ` David C. Hoos, Sr.
1999-03-02 0:00 ` GNAT discussions should be here as well kvisko
1999-03-02 0:00 ` Larry Kilgallen
1999-03-02 0:00 ` Samuel Mize
1999-03-02 0:00 ` Mike Silva
1999-03-02 0:00 ` robert_dewar
1999-03-02 0:00 ` dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox