Talk:Executable library: Difference between revisions

Line 76:
It is not clear if the executable ./hailstone_test calls the compiled library ./hailstone or if it just compiles in the source to ./hailstone (which would not satisfy the task). --[[User:Paddy3118|Paddy3118]] 18:10, 29 May 2012 (UTC)
: With the proper set of compiler options, you can compile and link ''hailstone_test.adb'' and generate the executable hailstone_test '''without''' the source ''hailstone.adb'', but with the specification ''hailstone.ads''. Which seems to satisfy the task. On the other hand, as for most compiled languages, there is something in between source code and executable. To generate either of the the executables ''hailstone'' and ''hailstone_test'' the linker must access the object code in ''hailstone.o''.
 
::Hi, the task would require ./hailstone to be an executable and ./hailstone_test to be another executable that does not contain the code of ./hailstone but would get theat functionality from the ./hailstone file (probably by dynamic linking). That is very hard to do in a compiled language but not impossible - [[Executable_library#C|the C example]] shows that it can be done.
 
::As it stands, it seems as if the ADA code doesn't do enough. --[[User:Paddy3118|Paddy3118]] 20:14, 30 May 2012 (UTC)
Anonymous user