Hi Gabe,

Thank you very much for your reply.
I have libm5.a in gem5/util/m5/build/x86/out
but I still get the same error. Is it a problem with the flags I added to
the makefile?

Cheers,
Veronia

On Thu, Feb 4, 2021 at 1:01 PM Gabe Black <[email protected]> wrote:

> 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 <
> [email protected]> 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 -- [email protected]
>> To unsubscribe send an email to [email protected]
>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
>
_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to