My server is a Amazon Linux AMI 64bits (2014.09-release-notes)
I compiled a program coded in C++ (gcc48-c++.x86_64 is installed) :
[root@ip-***-**-**-*** waveform_generator]# make
Compiled [src/main.cpp] >> [src/main.o]
Compiled [src/File.cpp] >> [src/File.o]
Compiled [src/AGenerator.cpp] >> [src/AGenerator.o]
Compiled [src/GeneratorSVG.cpp] >> [src/GeneratorSVG.o]
Compiled [src/GeneratorCanvas.cpp] >> [src/GeneratorCanvas.o]
Compiled [src/GeneratorPNG.cpp] >> [src/GeneratorPNG.o]
Compiled [src/Header.cpp] >> [src/Header.o]
Compiled [src/pngwriter.cpp] >> [src/pngwriter.o]
Built [wfgen]
Now when I execute the compiled file "wfgen" the console return this message :
[root@ip-***-**-**-*** waveform_generator]# bash wfgen
wfgen: wfgen: cannot execute binary file
Environment :
[root@ip-***-**-**-*** waveform_generator]# uname -i
x86_64
[root@ip-***-**-**-*** waveform_generator]# file wfgen
wfgen: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=2e7c881c6fc10f12cdf49402edae1cc36b8d77a0, not stripped
Do you have a solution to my problem?
Thank you a lot :)
Max.
When you type
[root@ip-***-**-**-*** waveform_generator]# bash wfgen
I think bash expects wfgen to be a shell script. Instead you could directly type the program name at th e prompt
[root@ip-***-**-**-*** waveform_generator]#./wfgen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With