denisrono

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Compiling C++ code #64646

    denisrono
    Participant

    Hi,

    I properly rebuilt the buildroot directory by first calling:make cleanthenmakeThe C++ code compiled successfully, however, when i try to run the code on the minimorph, I get the following error:./testcpp: can't load library 'libstdc++.so.6'I have tried reflashing the board but the error still persists. Would I need to rebuild the linux kernel and adding certain modules?

    Thanks

    in reply to: Compiling C++ code #64649

    denisrono
    Participant

    Hey,

    when I use the syntax above in a Makefile and try to compile a simple “hello,world” application, I get the following error:
    /home/kipchirchir/Meta-Linux-SDK/GPL/buildroot/output/host/usr/bin/metag-linux-cpp -g -o test test.cpp
    metag-linux-cpp: test.cpp: C++ compiler not installed on this system
    make: *** [test] Error 1
    I have both g++ and build-essential installed on my machine. Is there anything further I need to do to compile the C++ code or did I not follow your previous instructions properly?

    Thanks

    in reply to: Compiling C++ code #64650

    denisrono
    Participant

    I assume one then compiles the C++ code by entering the following into a makefile:

    test: test.cpp
    $(CROSS_COMPILE)cpp $(TARGET_LDFLAGS) -g -o $@ $^

    in reply to: Compiling C++ code #64651

    denisrono
    Participant

    Thanks I will give it a go

    in reply to: unable to run compiled C code on minimorph #64665

    denisrono
    Participant

    I rebuilt my toolchain then re-registered the CROSS_COMPILE environment variable and was able to successfully compile my code and run it on the minimorph.

    Thank you. 🙂

    in reply to: unable to run compiled C code on minimorph #64667

    denisrono
    Participant

    The result of “file c_code” is:
    c_code: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x67cf02c22552ee09655a5e985f15aaad78c54c6f, not stripped

    in reply to: unable to run compiled C code on minimorph #64669

    denisrono
    Participant

    The result of ” ls -l” is:
    -rwxr-xr-x 1 root root 27144 Sep 25 2013 X.bin
    -rwxr-xr-x 1 root root 2412975 Sep 25 2013 Y.bin
    -rwxr-xr-x 1 root root 16619 Oct 13 2013 c_code
    -rwxr-xr-x 1 root root 9264 Oct 13 2013 code_test
    -rwxr-xr-x 1 root root 897484 Sep 25 2013 test.bin
    -rwxr-xr-x 1 root root 6392605 Feb 7 2013 vmlinux.ub

    (The files “X.bin”, “Y.bin” and “test.bin” are files that will be used by my program.)
    If I type:
    $ vi c_code
    Into the terminal, the output is an unintelligible sequence of symbols so (definitely not a text file)

    I did not compile “code_test” from the SDK. The version of “code_test” I downloaded had no main function so I wrote my own and compiled it using the same make file (and kept the output name). My simple program uses “printf” to print “Hello, World” on the screen.

    I am using V1.9 of the SDK.

    in reply to: unable to run compiled C code on minimorph #64671

    denisrono
    Participant

    I ran the “Hello, World” application through the terminal as well using:
    $ ./code_test

    The output of “file c_code” is:
    -sh: file: not found
    The same output is returned if i type “file filename.ext” for any file in the “/mnt” directory.

Viewing 8 posts - 1 through 8 (of 8 total)