What does libRack.a include?

This is probably a silly question, but I am still learning. I’m just a beginner developer getting into OpenGL, and I’m curious how all of the under workings are integrated in VCV Rack. Are GLEW and GLFW integrated in libRack.a and that’s why I can use them when libRack.a is linked somewhere?

Have a look inside the Makefile inside Rack source code folder. It indeed includes the binary *.o files corresponding to source files from Andrew’s code, glew, glfw, rtaudio and all the other stuff that you have to call into when making your plugin. A .lib file is just an archive of compiled objects. For more see here https://en.wikipedia.org/wiki/Static_library

1 Like

Awesome! Thank you for sharing this info! Now I understand where libglfw3.a and libGLEW.a are being linked in Makefile. I’m currently in the process of learning how I can use them. I can’t wait to learn more as a novice developer!

1 Like

In Rack v1, libRack.a is an import library for Mingw on Windows only. It does not include implementations of symbols, only stubs. The linker needs this file when building plugin shared libraries because on Windows, all referenced symbols in a DLL must be resolved, unlike Linux and Mac, where dlopen() will resolve all undefined symbols in a shared library.

For Rack v2, the system is entirely different. On all platforms, Rack is a shared library libRack.so/dylib/dll. Plugins will link to this at link time, and on Windows, a libRack.dll.a file will be available which is comparable to the above libRack.a, for the same reason as above.


Got it! That is good info to know! I didn’t realize that the other libraries could also be linked through VCV Rack itself like @ShyOfTime mentioned. I was assuming they would be in the SDK folder that I downloaded. I just wrote my first shader in OpenGL 2.1 and it’s working with Rack! I also looked at some of the source code and found where GLFW is set up in window.cpp. I don’t think I need to mess with the settings for that, but it’s good to know that it’s there.

1 Like