cnetbeansmingwallegroallegro5

MinGW does not see the library in NetBeans


I am trying to configure compilation of a project in NetBeans.

enter image description here

I downloaded the latest version of the library assembly from GitHub. Unpacked to the root of the system directory.

enter image description here

In NetBeans indicated the path to store the "include, bin, lib" directory.

enter image description here

When writing code, the IDE pulls up the necessary headers and the code looks correct, without errors. When compiling, in the project properties specified the necessary keys: -lallegro_dialog -lallegro_primitives -lallegro

enter image description here

But for some reason, when compiling libraries are not pulled and Netbeans throws errors.

enter image description here

cd 'C:\NetBeans\AllegroTest'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/NetBeans/AllegroTest'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/allegrotest.exe
make.exe[2]: Entering directory `/c/NetBeans/AllegroTest'
mkdir -p dist/Debug/MinGW-Windows
gcc -lallegro_dialog -lallegro_primitives -lallegro    -o dist/Debug/MinGW-Windows/allegrotest build/Debug/MinGW-Windows/main.o 
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lallegro_dialog
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lallegro_primitives
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lallegro
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/allegrotest.exe] Error 1
make.exe[2]: Leaving directory `/c/NetBeans/AllegroTest'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/NetBeans/AllegroTest'
make.exe": *** [.build-impl] Error 2

СОБРАТЬ FAILED (значение выхода 2,, общее время: 453ms)

If i don't use keys -lallegro_dialog -lallegro_primitives -lallegro then

cd 'C:\NetBeans\AllegroTest'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/NetBeans/AllegroTest'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/allegrotest.exe
make.exe[2]: Entering directory `/c/NetBeans/AllegroTest'
mkdir -p dist/Debug/MinGW-Windows
gcc     -o dist/Debug/MinGW-Windows/allegrotest build/Debug/MinGW-Windows/main.o 
build/Debug/MinGW-Windows/main.o: In function `main':
C:\NetBeans\AllegroTest/main.c:23: undefined reference to `al_install_system'
C:\NetBeans\AllegroTest/main.c:25: undefined reference to `al_show_native_message_box'
C:\NetBeans\AllegroTest/main.c:30: undefined reference to `al_create_display'
C:\NetBeans\AllegroTest/main.c:34: undefined reference to `al_show_native_message_box'
C:\NetBeans\AllegroTest/main.c:39: undefined reference to `al_init_primitives_addon'
C:\NetBeans\AllegroTest/main.c:40: undefined reference to `al_install_keyboard'
C:\NetBeans\AllegroTest/main.c:42: undefined reference to `al_create_event_queue'
C:\NetBeans\AllegroTest/main.c:46: undefined reference to `al_show_native_message_box'
C:\NetBeans\AllegroTest/main.c:51: undefined reference to `al_get_keyboard_event_source'
C:\NetBeans\AllegroTest/main.c:51: undefined reference to `al_register_event_source'
C:\NetBeans\AllegroTest/main.c:52: undefined reference to `al_get_display_event_source'
C:\NetBeans\AllegroTest/main.c:52: undefined reference to `al_register_event_source'
C:\NetBeans\AllegroTest/main.c:57: undefined reference to `al_wait_for_event'
C:\NetBeans\AllegroTest/main.c:109: undefined reference to `al_map_rgb'
C:\NetBeans\AllegroTest/main.c:109: undefined reference to `al_draw_filled_rectangle'
C:\NetBeans\AllegroTest/main.c:110: undefined reference to `al_flip_display'
C:\NetBeans\AllegroTest/main.c:111: undefined reference to `al_map_rgb'
C:\NetBeans\AllegroTest/main.c:111: undefined reference to `al_clear_to_color'
C:\NetBeans\AllegroTest/main.c:114: undefined reference to `al_destroy_display'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/allegrotest.exe] Error 1
make.exe[2]: Leaving directory `/c/NetBeans/AllegroTest'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/NetBeans/AllegroTest'
make.exe": *** [.build-impl] Error 2

СОБРАТЬ FAILED (значение выхода 2,, общее время: 1s)

Then I recorded a visual video


Solution

  • The problem I was dealing with was I solved. The fact is that I am from Russia, and I have Russian localization in the operating system and there are Russian letters on the way. Because of this, it was not possible to access the attached library. But I fixed everything, now everything compiles successfully for me.

    I managed to compile using THIS library package. Initially, I thought of downloading each library individually, but then again I carefully looked at everything on the main site. I managed to successfully compile using these keys:

    -lallegro_monolith-static -static -ljpeg -ldumb -lwebp \
    -lFLAC -lvorbisfile -lvorbis -logg -lphysfs -lfreetype \
    -lpng16 -ldsound -lgdiplus -luuid -lkernel32 -lwinmm \
    -lpsapi -lopengl32 -lglu32 -luser32 -lcomdlg32 -lgdi32 \
    -lshell32 -lole32 -ladvapi32 -lws2_32 -lshlwapi -lpthread \
    -static-libstdc++ -static-libgcc -lz -lopusfile -lopus
    

    or

    -lallegro_dialog-static -lallegro_acodec-static -lallegro_audio-static \
    -lallegro_image-static -lallegro_primitives-static -lallegro_ttf-static \
    -lallegro_font-static -lallegro-static -static -ljpeg -ldumb -lwebp -lFLAC \
    -lvorbisfile -lvorbis -logg -lphysfs -lfreetype -lpng16 -ldsound -lgdiplus \
    -luuid -lkernel32 -lwinmm -lpsapi -lopengl32 -lglu32 -luser32 -lcomdlg32 \
    -lgdi32 -lshell32 -lole32 -ladvapi32 -lws2_32 -lshlwapi -lpthread \
    -static-libstdc++ -static-libgcc -lz -lopusfile -lopus