Forum Replies Created
I properly rebuilt the buildroot directory by first calling:
makeThe 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?
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.cppI 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?
metag-linux-cpp: test.cpp: C++ compiler not installed on this system
make: *** [test] Error 1
I assume one then compiles the C++ code by entering the following into a makefile:
$(CROSS_COMPILE)cpp $(TARGET_LDFLAGS) -g -o $@ $^
Thanks I will give it a go
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. 🙂
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
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.
I ran the “Hello, World” application through the terminal as well using:
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.