0

I am currently studying CP and have encountered a problem. I need to convert my C++ code to 32-bit TASM and use it inside an

__asm__(R"()");

inline assembly on a GNU 10.2 C++ 17 compiler with the default 64-bit compilation. The system is a Debian GNU/Linux 11 (bullseye) virtual machine on VMware Workstation 16.1.2 build-17966106 Pro (the host operating system is Windows 11, 64-bit, Pro, Central Processing Unit: i5-8300h). However, neither the command

gcc -m32 main.c -o main

nor

gcc -m32 main.cpp -o main

(even though I renamed the file to .cpp) have worked. The error messages follow. Thanks in advance. https://i.stack.imgur.com/gm4IG.png

  • 1
    Don't post error messages and code as image. From the error message it looks you don't have c++ compiler installed, only c. You need to install g++ package and compile c++ code with `g++` instead of `gcc`. – dewaffled Nov 03 '22 at 08:46
  • You'll need to install the 32-bit development libraries https://packages.debian.org/bullseye/gcc-multilib https://unix.stackexchange.com/questions/12956/how-do-i-run-32-bit-programs-on-a-64-bit-debian-ubuntu – Alan Birtles Nov 03 '22 at 08:53
  • Thank You very much, I'll be right back asap and answer if it works. – Vladyslav Maslov Nov 03 '22 at 09:45

0 Answers0