For a vst, static doesn't need to come into it unless you want static libraries linked in which might help with compatibility like in the above library problem, but I've seen problems with static libraries with some vst's.rghvdberg wrote:Noob dev question here.
If you compile the plugin statically linked to libc shouldn't that make the plugin work without installing a specific version of libc?
If so, could someone give me a hint how to do that?
When it's linked there is a -shared option indicating that a shared library is being made, and Linux vst's are shared libraries.
The Makefile I used for the vst is here https://github.com/osxmidi/the-source/b ... e/Makefile
The LDFLAGS are the linking options (-shared, libraries -lX11 etc) and the CFLAGS are the compiling options (optimizations -O3 -ffast-math etc)
-------------
CPPFLAGS := $(DEPFLAGS) -DLINUX=1 -DNDEBUG=1 -DJUCER_LINUX_MAKE_6D53C8B4=1 -DJUCE_APP_VERSION=1.0.2 -DJUCE_APP_VERSION_HEX=0x10002 -I /usr/include -I /usr/include/freetype2 -I ../../../vst -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -O3 -ffast-math -I../../../audio/inc -I../../../gui
CXXFLAGS += $(CFLAGS) -std=c++11
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -Wl,--no-undefined -shared -fvisibility=hidden -lX11 -lXext -lfreetype -ldl -lpthread -lrt
