I want to use DRAMSim2 as library interface in a developing PINtool.
I try to be familiar with dramsim_test.cpp that includes dramsim_test.h, that includes DRAMSim.h (in a specific directory).
If i put these files in the directory of my PINtool an include them (except .cpp. for this i use the code in the PINtool) i get a linker (i suppose) error:
undefined symbol: _ZN7DRAMSim23getMemorySystemInstanceERKSsS1_S1_S1_jPSs
The PINtool has a config file that writes these:
## Libraries to link
ifeq ($(TARGET_OS),mac)
APP_LIBS := -lm
else
APP_LIBS := -Wl,--as-needed -lm
endif
DL_LIB :=
APP_LIB_ATOMIC := -latomic
APP_LIB_XED := -lxed
TOOL_LIBS := -lpin -lxed
SATOOL_LIBS := -lsapin -lxed
CXX_LIBS :=
The makefile of dramsim example has this:
$(CXX) -g -o dramsim_test dramsim_test.cpp -I../ -L../ -ldramsim -Wl,-rpath=../
I suppose that i have to add somewhere in the pintool config file the -ldramism option but i dont know how.
Im not familiar also with linker options, configuration files etc. How can i link them?
UPDATE: The problem solved. After changing the conf file by adding -ldramsim and didnt work, i tried to move the libdramsim.so into the folder of allcache_v7.cpp and is ok...