Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error upon compiling in gcc #71

Closed
prtkdas96 opened this issue Nov 8, 2017 · 7 comments
Closed

Getting error upon compiling in gcc #71

prtkdas96 opened this issue Nov 8, 2017 · 7 comments

Comments

@prtkdas96
Copy link

cannot execute binary file: Exec format error

@DamonHD
Copy link

DamonHD commented Nov 8, 2017

Come on, this is a basic dev problem (with no detail) that you should not be pestering the maintainer with. Please make SOME effort.

Rgds

Damon

@kokke
Copy link
Owner

kokke commented Nov 9, 2017

Hi @prtkdas96 and thanks for checking out this project :)

If you would like help compiling the project, I'll need a bit more information to be able to.
I need to know how you compiled the code and how you tried to run it.
In other words: What have you tried and why did it not work?

I do agree with @DamonHD that perhaps you could try seeking help on stackoverflow.com or something similar.
Issues are usually reserved for reporting defects and I am sure that your problem comes from incorrect use somehow :)

@prtkdas96
Copy link
Author

Thanks for the help. I am sorry for disturbing you all. I am a newbie and was confused where to address my problem. @kokke I am using the latest version of Ubuntu and using gcc compiler. Although the program is compiling, running the same generates the error mentioned above.

@kokke
Copy link
Owner

kokke commented Nov 9, 2017

No problem @prtkdas96 we were all newbies once :)

How are you compiling the program?
Which commands are you running?

@prtkdas96
Copy link
Author

I am compiling the program using gcc -c aes.c -DCBC=1 -DECB=0 -o aes2. After that I am running ./aes2 which initially gave me error. But after some digging, I found out that using chmod results in successful compilation. But even after doing so, I am getting the cannot execute binary file error. Should I try recompiling it in a virtual box with ubuntu server for arm installed?

@kokke
Copy link
Owner

kokke commented Nov 10, 2017

If you are just running gcc -c aes.c -DCBC=1 -DECB=0 -o aes2 you cannot execute the output. That is just object-code, not a binary.
You need to also add a main()-function and compile that and link with the aes2-object code.

@kokke
Copy link
Owner

kokke commented Nov 13, 2017

I'm closing this issue since it seems it wasn't a problem with the code.

Did you get the code to compile and run after all ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants