16.12.2012, 05:37
Cool,pretty useful!
I am not able to create a windows plugin because I got a linux only.
|
Linking CXX shared module profiler.so /usr/bin/ld: ../amx_profiler/libamx_profiler.a(call_graph_writer.cpp.o): relocation R_X86_64_32S against `vtable for amx_profiler::CallGraphWriter' can not be used when making a shared object; recompile with -fPIC ../amx_profiler/libamx_profiler.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [plugin/profiler.so] Error 1 make[1]: *** [plugin/CMakeFiles/plugin.dir/all] Error 2 make: *** [all] Error 2
Linking CXX shared module profiler.so /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_graph_writer.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_graph_writer_dot.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(debug_info.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(profiler.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(public_function.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer_html.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer_text.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(statistics_writer_xml.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(time_utils.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(amx_utils.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_graph.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(call_stack.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(function.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(function_call.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(function_statistics.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(native_function.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(normal_function.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(performance_counter.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx_profiler/libamx_profiler.a(clock-posix.cpp.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `subhook/libsubhook.a(subhook.c.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx/libamx.a(amxaux.c.o)' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file `../amx/libamx.a(amxdbg.c.o)' is incompatible with i386 output ../amx_profiler/libamx_profiler.a(debug_info.cpp.o): In function `amx_profiler::DebugInfo::DebugInfo(tagAMX_DBG const*)': debug_info.cpp:(.text+0x42): undefined reference to `operator new(unsigned long)' ../amx_profiler/libamx_profiler.a(debug_info.cpp.o): In function `amx_profiler::DebugInfo::DebugInfo(tagAMX_DBG const*)': debug_info.cpp:(.text+0x84): undefined reference to `operator new(unsigned long)' ../amx_profiler/libamx_profiler.a(debug_info.cpp.o): In function `amx_profiler::DebugInfo::Load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': debug_info.cpp:(.text+0x14c): undefined reference to `operator new(unsigned long)' ../amx_profiler/libamx_profiler.a(profiler.cpp.o): In function `amx_profiler::Profiler::DebugHook(int (*)(tagAMX*))': profiler.cpp:(.text+0x552): undefined reference to `operator new(unsigned long)' ../amx_profiler/libamx_profiler.a(profiler.cpp.o): In function `amx_profiler::Profiler::CallbackHook(int, int*, int*, int (*)(tagAMX*, int, int*, int*))': profiler.cpp:(.text+0x71b): undefined reference to `operator new(unsigned long)' ../amx_profiler/libamx_profiler.a(profiler.cpp.o):profiler.cpp:(.text+0x8c5): more undefined references to `operator new(unsigned long)' follow collect2: ld returned 1 exit status make[2]: *** [plugin/profiler.so] Error 1 make[1]: *** [plugin/CMakeFiles/plugin.dir/all] Error 2 make: *** [all] Error 2
cmake -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 ...
cd path/to/profiler
cmake -DCMAKE_BUILD_TYPE=Release .