Building the Dynamic LibraryThe plug-in must be compiled as a dynamic library. You can use the following sample Makefile to compile the sample program on Mac OS X. ############################################################################ # Makefile for building: libsample_plugin.dylib ############################################################################ CC = g++ RM = rm -f CCFLAGS = -c -Wall -arch i386 -arch x86_64 -O2 -gdwarf-2 -fvisibility=hidden -O2 -fPIC -mmacosx-version-min=10.5 INCPATH = -I../Library/Frameworks/ParallelsVirtualizationSDK.framework/Headers LDFLAGS = -arch x86_64 -mmacosx-version-min=10.5 -arch i386 -single_module -dynamiclib -compatibility_version 1.0 -current_version 1.0.0 -install_name libsample_plugin.1.dylib LIBRARY = libsample_plugin.dylib SRCFILE = Plugin.cpp OBJFILE = $(SRCFILE:.cpp=.o) .cpp.o: $(CC) $(CCFLAGS) $(INCPATH) $< $(LIBRARY): $(OBJFILE) $(CC) $(LDFLAGS) $(OBJFILE) -o $@ all: $(LIBRARY) clean: $(RM) *.o *.dylib |
||||
|