I am trying to configure compilation of a project in NetBeans.
{"name":"d1f22c6e5fa1.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/b\/7bc8f42f11b9d8c8633ca4e828667de6.png","w":783,"h":664,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/b\/7bc8f42f11b9d8c8633ca4e828667de6"}
I downloaded the latest version of the library assembly from GitHub. Unpacked to the root of the system directory.
{"name":"e58bf69dc847.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/9\/792fabf6a1360d5100c348d9fa3e7db5.png","w":1059,"h":519,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/9\/792fabf6a1360d5100c348d9fa3e7db5"}
In NetBeans indicated the path to store the "include, bin, lib" directory.
{"name":"3ca6fa204bc9.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/f\/5f27034604d0aa0cd478cd8be4a8ff6c.png","w":940,"h":350,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/f\/5f27034604d0aa0cd478cd8be4a8ff6c"}
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
{"name":"e84e50d49a79.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a0daca5513d0ae28dc4fae17ae729b8.png","w":912,"h":505,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a0daca5513d0ae28dc4fae17ae729b8"}
But for some reason, when compiling libraries are not pulled and Netbeans throws errors.
full image
{"name":"ba899c62c42c.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/2\/529f6cf787da4206844a3695e58e421a.png","w":2560,"h":951,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/2\/529f6cf787da4206844a3695e58e421a"}
If i don't use keys -lallegro_dialog -lallegro_primitives -lallegro then
I have already copied bin to MinGW itself, but this did not work. I ask for help.:(
Screencast
It is finding the headers OK (otherwise you would get compile errors when compiling .c to .o) but not the libraries.
Usually either the libs are in the compiler's standard locations, or the command line would mention them specifically, for example:
gcc -Lpath/to/allegro/libraries -lallegro_dialog -lallegro_primitives -lallegro -o dist/Debug/MinGW-Windows/allegrotest build/Debug/MinGW-Windows/main.o
Can you show us what nbproject/Makefile-Debug.mk looks like?
Also: the directory you put a red box around looks to be a 64-bit one, but your compiler is mingw32. Are you trying to link a 32-bit program with 64 bit libraries?
Edgar is the expert on this stuff (if I was working in Windows I'd use VS and the NuGet packages rather than MinGW)
One problem is link order. You have to link after you compile your main .o file.
gcc -lallegro_dialog -lallegro_primitives -lallegro -o dist/Debug/MinGW-Windows/allegrotest build/Debug/MinGW-Windows/main.o
-l goes after main.o in this case