<div class="__aliyun_email_body_block"><div style="color: #333333;font-size: 14.0px;font-family: tahoma , arial , stheiti , simsun;">Hello, Everyone!<br></div><div style="color: #333333;font-size: 14.0px;font-family: tahoma , arial , stheiti , simsun;"><br></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">Recently, I am leanring how to write a Clang plugin. I begin with the plugin PrintFunctionsNames. PrintFunctionsName is issued with Clang(locating in CLANG_SOURCE_PATH/examples/PrintFunctionNames), and is used for an exmple to illustrate how to write a plugin for Clang.<br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;"><br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">I use command "make" to generate libPrintFunctionNames.so and libPrintFunctionNames.a, then use the command "clang ./hello.c -Xclang -load -Xclang LLVM_BUILD_PATH/Release+Asserts/lib/libPrintFunctionNames.so -Xclang -plugin -Xclang print-fns" to test the plugin on ./hello.c, which is a simple helloworld program.<br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;"><br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">But I get an error, which is </div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">        "/usr/bin/ld: cannot find /tmp/hello-xxxxxx.o: No such file or directory</div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">         clang: error: linker command failed with exit code 1 (use -v to see invocation)".<br></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;"><br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">Howevery, if I use the command "clang ./hello.c <span style="color: rgb(255, 0, 0);"><strong>-E</strong></span> -Xclang -load -Xclang LLVM_BUILD_PATH/Release+Asserts/lib/libPrintFunctionNames.so -Xclang -plugin -Xclang print-fns", PrintFunctionNames works well.<br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;"><br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">So I want to know why I cannot use clang to generate a executable file for ./hello.c when the plugin PrintFunctionNames is enabled?<br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;"><br data-mce-bogus="1"></div><div style="color: rgb(51, 51, 51); font-size: 14px; font-family: tahoma,arial,stheiti,simsun;">Any help is appreciated!<br data-mce-bogus="1"></div></div>