[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: undefined reference to `main' and strange gnat behaviour



On Wed, 24 Sep 2014 10:24:27 +0100
Brian Drummond
<brian@shapes.demon.co.uk> wrote:

> Check file modification timestamps after each editor has finished :
> you are looking for a reason why gnatmake thinks an object file is up
> to date (newer than the source) when it is not...

Well, here we see something interesting...

$ ls -al
total 4
drwxr-xr-x 1 gour gour  18 Ruj 24 12:03 ./
drwxr-xr-x 1 gour gour 118 Ruj 21 17:30 ../
-rw-r--r-- 1 gour gour 118 Ruj 24 12:03 hello.adb

$ gnatmake hello.adb 
gcc-4.9 -c hello.adb
gnatbind -x hello.ali
gnatlink hello.ali
 
$ ls -l
total 36
-rwxr-xr-x 1 gour gour 23627 Ruj 24 12:03 hello*
-rw-r--r-- 1 gour gour   118 Ruj 24 12:03 hello.adb
-rw-r--r-- 1 gour gour  1438 Ruj 24 12:03 hello.ali
-rw-r--r-- 1 gour gour  1648 Ruj 24 12:03 hello.o

$ vim hello.adb 

$ ls -al
total 36
drwxr-xr-x 1 gour gour    60 Ruj 24 12:04 ./
drwxr-xr-x 1 gour gour   118 Ruj 21 17:30 ../
-rwxr-xr-x 1 gour gour 23627 Ruj 24 12:03 hello*
-rw-r--r-- 1 gour gour   117 Ruj 24 12:04 hello.adb
-rw-r--r-- 1 gour gour  1487 Ruj 24 12:04 hello.ali
-rw-r--r-- 1 gour gour   657 Ruj 24 12:04 hello.o


which shows that after editing file with vim, timestamps of the
hello.{ali,o} changes as if vim automagically triggers compilation.

However, I'm really new with Ada on Debian so have no clue who is the
culprit doing some secret work?


Sincerely,
Gour

-- 
He who is satisfied with gain which comes of its own accord, who 
is free from duality and does not envy, who is steady in both 
success and failure, is never entangled, although performing actions.



Reply to: