Decided not to use Visual studio or Code::Blocks, installed MinGW. The compilation seems clear. Got another question, how to connect the library. Watched a couple of videos, read a couple of articles, but never found. As I understand this requires linking. Let's say I would like to use GLFW. Threw the desired files into the folders of MinGW and prescribed:
#include <GLFW/glfw3.h>
int main()
{
glfwInit();
return 0;
}
without
glfwInit compiles fine but gives this:
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\kitsuro\AppData\Local\Temp\ccOL0feh.o:Minecraft.cpp:(.text+0xc): undefined reference to `glfwInit'
As a "Text editor" I use Sublime Text 3.
.a
and not.dll
. In my case the command looks like this:The order of libraries is important. - Alyson_Bayer commented on April 19th 20 at 12:15
that's what happens. When downloaded glfw in the archive folder include and lib. In lib were 3 files: glfw3.dll, libglfw3.a, libglfw3dll.a. I was transferred to the correct folder, did include. prescribed and 1 and option 2 (Cheated all the way if that). The result is the same. - Troy.Walter commented on April 19th 20 at 12:18