Looks like you didn't compile m5op_<architecture>.S and link it... I'm not sure 
if you're getting an error with that the c++ compiler at all. The only possible 
reason some c++ name mangling, but you can resolve that my wrapping m5op.h with 
extern "C" { ...... }.

Ali

On Aug 31, 2011, at 1:35 PM, shu wrote:

> Hi all,
> 
> I wrote a checkpoint in my program. However, It cannot be compiled when I 
> make the makefile.
> 
> My program has two files: test.cpp and example.h.
>  test.cpp will invoke example.h.
> I wrote the checkpoint (m5_checkpoint(0,0);)in example.h. 
> The test.cpp and example.h both invoke the m5op.h file.
> 
> the result is:
> 
> test.o(.text+0x470c): In function `mexFunction(float*, float**, int)':
> /home/shu/Desktop/hello/compiler/bin/example.h:129: undefined reference to 
> `m5_checkpoint(unsigned long, unsigned long)'
> test.o(.text+0x4714):/home/shu/Desktop/hello/compiler/bin/example.h:129: 
> undefined reference to `m5_checkpoint(unsigned long, unsigned long)'
> collect2: ld returned 1 exit status
> make: *** [m5] Error 1
> 
> 
> It always show me the m5_checkpoint function was undefined.
> Is there any body know how to solve this question?
> 
> Thanks in advance.
> 
> Regards,
> Shu
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to