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

Can't execute i386 binary file #2186

Closed
ghost opened this issue Jun 3, 2017 · 3 comments
Closed

Can't execute i386 binary file #2186

ghost opened this issue Jun 3, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 3, 2017

  • Your Windows build number:

10.0.15063

  • What you're doing and what's happening:

I try to run i386 file in BashOnWindows.
I wrote a simple C program 'A.c' and use 'gcc A.c -m32' to make the file 'a.out'
When I use './a.out' to execute it.
It shows ''bash: ./a.out: cannot execute binary file:"

I use Google to find the solution for Ubuntu and try them.
When I use 'dpkg --print-foreign-architectures' to check out.
It shows 'i386' which means the system support i386 binary file.
But when I use './a.out', it still shows ''bash: ./a.out: cannot execute binary file:"

  • What's wrong / what should be happening instead:

I am a rookie, and I don't know what is wrong.

@CherryDT
Copy link

CherryDT commented Jun 3, 2017

WSL supports only 64-bit (you can consider upvoting the thread about 32-bit support on User Voice) so it will only work without -m32.

The output of dpkg --print-foreign-architectures just tells you that the package manager supports managing packages of those architecture (e.g. for cross-compiling), not that you can actually execute code targeted at them.

@ghost
Copy link
Author

ghost commented Jun 3, 2017

@CherryDT Thanks~

@benhillis
Copy link
Member

Marking as duplicate of #228.

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

No branches or pull requests

2 participants