dciabrin / ngdevkit

Open source development for Neo-Geo
GNU Lesser General Public License v3.0
262 stars 26 forks source link

C++ compile issue #73

Open NeoGeoFreak2004 opened 2 years ago

NeoGeoFreak2004 commented 2 years ago

hey yall, so anyways i was trying to compile my own c++ code using ngdevkit but when i type make into the terminal it gives me a error. The error says: g++ -c -o main.o main.cpp /usr/bin/m68k-neogeo-elf-gcc -o rom.elf main.o pkg-config --libs ngdevkit main.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status make: *** [Makefile:17: rom.elf] Error 1 idk what this means so can you please help me with this error!

NeoGeoFreak2004 commented 2 years ago

Hey, can you give me a answer why I’m getting this error.

dciabrin commented 2 years ago

From the look of your command line, you tried to compile your main.cpp with a c++ compiler that's not built by ngdevkit. So it won't produce m68k-elf suitable for linking by m68k-neogeo-elf-gcc

Support for c++ has been dropped in git a long time ago.

humbertodias commented 9 months ago

@NeoGeoFreak2004 maybe you could use the docker version https://github.com/dciabrin/ngdevkit/pull/102 as a workaround for while. I have tried the same command inside the container and the result was:

pkg-config --list-all | sort | grep ngevkit
ngdevkit               ngdevkit - Opensource development for the Neo-Geo

and

pkg-config --libs ngdevkit
-L/ngdevkit/local/m68k-neogeo-elf/lib -specs ngdevkit-specs -lngdevkit