the m5op.h header file is a "C" header file you should edit it, and add the following lines:

#ifndef __M5OP_H__
#define __M5OP_H__
extern "C" {
...
...
...
...
}

#endif
#endif // __M5OP_H__



On 11/19/2013 09:22 AM, ???? ???? wrote:
this is what i've done:

The commands i entered:

*epyogi@merge-server:~/gem5/fft$ ../nacson_files/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -O2 -o m5op_alpha_new.o -c m5op_alpha.S epyogi@merge-server:~/gem5/fft$ ../nacson_files/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -O2 -o run_fft_new.o -c run_fft.cpp epyogi@merge-server:~/gem5/fft$ ../nacson_files/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o run_fft run_fft_new.o m5op_alpha_new.o*


this is the errors i got:

*run_fft_new.o: In function `main':
(.text+0x288): undefined reference to `m5_reset_stats(unsigned long, unsigned long)'
run_fft_new.o: In function `main':
(.text+0x2b4): undefined reference to `m5_reset_stats(unsigned long, unsigned long)'
run_fft_new.o: In function `main':
(.text+0x520): undefined reference to `m5_dumpreset_stats(unsigned long, unsigned long)'
run_fft_new.o: In function `main':
(.text+0x524): undefined reference to `m5_dumpreset_stats(unsigned long, unsigned long)'
collect2: ld returned 1 exit status
epyogi@merge-server:~/gem5/fft$*


On Sun, Nov 17, 2013 at 7:39 PM, Bill Tuohy <tuohy...@umn.edu <mailto:tuohy...@umn.edu>> wrote:

    util/m5/m5op_alpha.S


    On Nov 17, 2013, at 5:59 AM, ???? ???? <yoavor...@gmail.com
    <mailto:yoavor...@gmail.com>> wrote:

    Hi,

    I'm trying to cross compile a certain program from cpp to an
    alpha processor.
    As i understood i need to implant 2 gem5 commands in order to get
    a stat file (reset_ststs & dumpreset_ststs, don't catch me on the
    correct syntax).
    After the first phase of the compilation i get a binary file
    let's say my_program.o
    Inside this file I include m5op.h, to which file should I link to
    my_program.o so I could finish the compilation.

    For example i want to use the next command:

    *Alphaev67-unknown-linux-gnu-g++ -o my_program my_program.o
    <gem5_file>*

    How to end the command so i'll get an executable gem5 program?


    Thanks,


    Yoav Oren

    _______________________________________________
    gem5-users mailing list
    gem5-users@gem5.org <mailto:gem5-users@gem5.org>
    http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users


    _______________________________________________
    gem5-users mailing list
    gem5-users@gem5.org <mailto:gem5-users@gem5.org>
    http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users




_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to