Hi Veronia. scons build/x86/out/m5 asks scons to build the m5 utility, not the m5 library which is called build/x86/out/libm5.a. You may have some other library on your system called m5 which -lm5 is picking up which doesn't have that symbol.
Gabe On Thu, Feb 4, 2021 at 3:52 AM Veronia Bahaa via gem5-users < gem5-users@gem5.org> wrote: > Hello, > > I have been trying to use the m5_checkpoint inside a C++ test program. But > when I run the application makefile I always get > undefined reference to `m5_checkpoint' collect2: error: ld returned 1 exit > status > I did the following steps: > 1- Build m5 and lib m5 using scons build/x86/out/m5 > 2- Add #include <gem5/m5ops.h> to the test application C++ file > 3- Add these commands to the Makefile > GEM5_PATH = /home/veronia/gem5 > TARGET_ISA = x86 > CFLAGS = -I$(GEM5_PATH)/include > LDFLAGS = -L$(GEM5_PATH)/util/m5/build/$(TARGET_ISA)/out -lm5 > > Am I missing some steps? > Thanks in advance! > > Cheers, > Veronia > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s