banach-space / clang-tutor

A collection of out-of-tree Clang plugins for teaching and learning
The Unlicense
659 stars 62 forks source link

[ERROR]$Clang_DIR/bin/clang -cc1 -load ./libHelloWorld.{so|dylib} -plugin hello-world $CLANG_TUTOR_DIR/test/HelloWorld-basic.cpp #32

Closed yaodongwen closed 7 months ago

yaodongwen commented 7 months ago

When I execute command : $Clang_DIR/bin/clang -cc1 -load ./libHelloWorld.{so|dylib} -plugin hello-world $CLANG_TUTOR_DIR/test/HelloWorld-basic.cpp

error: unable to load plugin './libHelloWorld.{so': './libHelloWorld.{so: cannot open shared object file: No such file or directory' dylib}: command not found

My clang is clang 16. How can I resolve this error?

banach-space commented 7 months ago

On Linux:

$Clang_DIR/bin/clang -cc1 -load ./libHelloWorld.so -plugin hello-world

On MacOS:

$Clang_DIR/bin/clang -cc1 -load ./libHelloWorld.dylib -plugin hello-world

Please let me know if that fixes the issue for you.