4
4
4gn2015-10-23 03:21:21
C++ / C#
4gn, 2015-10-23 03:21:21

How to compile C++ on Linux architecture 32 bits so that it works on Linux hosting 64 bits?

now I can't run files, writes:
cannot execute binary file: exec format error
so I need to somehow compile on 64 architecture. hosting is virtual, there is no way to install a compiler there.
and on your laptop to put 64 Linux too lazy. tell me if there are special compiler modes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
4
4gn, 2015-10-23
@4gn

support told me that you can compile to the server if you log in with a docker virtual environment ..
that is, first connect just to the server via ssh and then re-login like this:
ssh [email protected] -p 222
indeed, so g++ began to work for me, I compiled the file there and he began to open up. the issue is partially resolved.
I want to know how to compile for 64 architecture

O
Oleg Tsilyurik, 2015-10-23
@Olej


now I can't run files, writes:
cannot execute binary file: exec format error
He writes correctly...
We take man to the GCC compiler (there is a lot of it) and read about machine-dependent options (-m32, -m64, --target-help...)
Or here: gcc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question