radioegor146 / jar-to-dll

A tool to pack mod .jar to .dll and inject it into running minecraft
169 stars 53 forks source link

main.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in #include "main.h" #9

Closed Sqorx closed 7 months ago

Sqorx commented 3 years ago

Hello! When I am trying to do this command ,,g++ -Wall -DBUILD_DLL -O2 -std=c++11 -m64 -c main.cpp -o main.o" The following error message is appearing:

,,main.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in #include "main.h" "

How can I fix it?

Mqlvin commented 1 year ago

Hi, this is over a year late but I will provide a solution (for Windows users) for the problem anyway - maybe someone in the future will need it.

  1. You need to install the 64-bit version on MinGW - you can download it from here as a 7zip archive and extract it into an installation directory of your choice (e.g. C:\MinGW-64)

In this C:\MinGW-64, you should have folders named bin, include, lib...

  1. Next, open your environment variables editor. You can simply type "environment variables" in the search bar, and open the panel.

  2. Click "Environment Variables..."

  3. Under the System Variables box (the bottom panel), click the PATH and click "Edit".

  4. Add a new path to the bin folder, e.g. C:\MinGW-64\bin.

  5. Open a new terminal and execute the command.

This should fix the problem. Ensure you don't have an old MinGW installation also in the PATH variable, and check your current MinGW installation by executing gcc -v in the terminal.