Are you using GNAT to compile and link your code? Essentially, you have to pass the necessary parameter for the library you are calling (you used the term "DLL", presumably meaning you are in a Microsoft Windows environment). I can't comment directly on Windows, but in Linux, you can pass -l. You can do that through the -largs argument so, for example, I have a situation where I am compiling an application that uses the wiringPi C library (on a Raspberry Pi) and what I pass is "-largs -lwiringPi". I have a separate package that provides an interface to that library. I guess your "Addition" package does that, if not, we need to see what it is.
Another technique, more generally for using libraries, is to use the tools provided by GNAT. For example, if "Addition" was a part of the GNAT tools libraries, then you could use the method. In this case, you have a separate project file (or, more to the point, Gnat does), that you reference in your project file. I presume you are using project files? A good reference is here: https://learn.adacore.com/courses/GNAT_Toolchain_Intro/chapters/gprbuild.html?highlight=project
That also shows how you might create your own tool sets.
For one of my projects (I will pop it on GitHub when I have all the bugs fully ironed out), I have a Makefile that looks like:
#########################################################
# Make file for Light Switches #
#########################################################
# Use standard variables to define compile and link flags
ACC=gprbuild
TA=light_switches
TS=$(TA).gpr
HOST_TYPE := $(shell uname -m)
ifeq ($(HOST_TYPE),amd)
TARGET=sparc
else ifeq ($(HOST_TYPE),x86_64)
TARGET=amd64
else ifeq ($(HOST_TYPE),x86)
TARGET=x86
else ifeq ($(HOST_TYPE),i686)
TARGET=x86
else ifeq ($(HOST_TYPE),arm)
TARGET=pi
else ifeq ($(HOST_TYPE),armv7l)
TARGET=pi
endif
BIN=/usr/local/bin
ETC=/usr/local/etc
VAR=/var/local
TD=obj_$(TARGET)
ifeq ("$1.",".")
FLAGS=-Xhware=$(TARGET)
else
FLAGS=-Xhware=$(TARGET) $1
endif
ifeq ($(TARGET),pi)
FLAGS+=-largs -lwiringPi
endif
lightswitches:
$(ACC) -P $(TS) $(FLAGS)
# Define the target "all"
all:
lightswitches:
# Clean up to force the next compilation to be everything
clean:
gprclean -P $(TS)
dist-clean: distclean
distclean: clean
install:
cp $(TD)/$(TA) $(BIN)
cp $(TD)/$(TA).xml $(VAR)
cp $(TD)/$(TA).xsd $(ETC)
cp $(TD)/$(TA).rc $(ETC)/init.d/$(TA)
cp $(TD)/$(TA).default $(ETC)/default/$(TA)
Then I have a project file that looks like:
with "xmlada";
with "adasockets";
with "../tools/dstrings";
project Light_Switches is
type Hware_Option is ("sparc", "amd64", "x86", "pi");
Hware : Hware_Option := external ("hware", "amd64");
for Languages use ("ada");
case Hware is
when "pi" =>
for Source_Dirs use ("src/", "src/pi/", "../tools/");
when others =>
for Source_Dirs use ("src/", "src/non_pi/", "../tools/");
end case;
for Main use ("light_switches.adb");
-- Using "hware" variable for obj directory
for Object_Dir use "obj_" & hware & "/";
package Ide is
for Documentation_Dir use "doc/";
end Ide;
for Source_Files use ("error_log.adb",
"error_log.ads", "general_storage_pool.adb", "general_storage_pool.ads",
"switch_types.ads", "switch_database.ads", "switch_database.adb",
"lights_control.ads", "lights_control.adb", "light_switch_version.ads",
"light_switch_functions.ads", "light_switch_functions.adb",
"basic_lights_interface.ads", "basic_lights_interface.adb",
"host_functions.ads", "host_functions.adb", "host_functions_thin.ads",
"generic_command_parameters.ads", "generic_command_parameters.adb",
"interlocks.ads", "interlocks.adb",
"calendar_extensions.adb", "calendar_extensions.ads",
"dynamic_lists.adb", "dynamic_lists.ads",
"string_conversions.ads", "string_conversions.adb",
"wiring_pi.ads", "wiring_pi.adb",
"generic_versions.ads", "generic_versions.adb", "light_switches.adb");
end Light_Switches;
The projects that this project uses are at the top in the with statements. You might notice that one of them is one of mine (in my "tools" directory). Also, in the above, wiring_pi.adb is in two formats, one being in the "pi" directory and the other in the "non_pi" directory. The one in the non_pi directory is a stub (for testing on non-Pi hardware) and the one in the pi directory has the list of routines that exist in the wiringPi C library file (which is a .so file in the unix world, equivalent to a DLL).
I hope that helps. If not, we would be happy to entertain once we have some more information about your full set of files in your project.