Linking error of Dynamic Library created with Projucer (macOS)


I am struggling with linking a dynamic library made with JUCE.

I used a Projucer to create a Xcode project for a dynamic library and successfully made a dylib, but when using it in other project, it always get a linker error something like shown below.

Undefined symbols for architecture x86_64:
“testComponent::testComponent()”, referenced from:

It doesn’t happen when creating a dynamic library without using Projucer.
Any help would be appreciated.
Thank you!!

OK! Now, I could solve it.

I have checked the built dynamic library by nm command and found that no class was included in it.

The solution is here, Xcode has Xcode<Build Settings<Apple Clang - Code Generation < Symbols Hidden by default = YES in default, and we need to switch it to NO.
Then rebuild and worked fine!