我发现
使-n
允许一个重现什么复杂的Makefile做。从那里,这是一个试验和错误的问题。下面是适用于我的Makefile。
libppapi_example.so:stub.o
g++ -shared -pthread -Wl,-z,noexecstack -Wl,-soname=libppapi_example.so -o libppapi_example.so -Wl,--start-group stub.o libppapi_cpp.a libppapi_cpp_objects.a -Wl,--end-group
stub.o:
g++ '-DNO_HEAPCHECKER' '-DCHROMIUM_BUILD' '-DENABLE_REMOTING=1' '-DENABLE_GPU=1' '-D__STDC_FORMAT_MACROS' '-DDYNAMIC_ANNOTATIONS_ENABLED=1' '-D_DEBUG' -I/home/carlos/Desktop/chromium/src/ -Werror -pthread -fno-exceptions -Wall -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -pipe -fPIC -fno-strict-aliasing -fPIC -fvisibility=hidden -fvisibility=hidden -O0 -g -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -MMD -MF stub.o.d.raw -c -o stub.o stub.cc
clean:
rm -f stub.o.d.raw stub.o libppapi_example.so
run:
google-chrome -d --register-pepper-plugins="/home/carlos/Desktop/ppapi/examples/stub/libppapi_example.so;application/x-ppapi-example"