How to use dynamic shared library in xcode project in c ++?

I created a new project in Xcode (using the "STL C ++ library" template) and made a small test function void hello();that prints to the console.

It compiles fine and I can export the dylib file.

I can’t figure out how to create a project that then references this file and can call a method hello().

Any advice is appreciated.

Alex

+3
source share
1 answer

Create another Xcode project, such as an application project. In your example, you can create a command line tool project that uses C ++.

dylib Link Binary . Xcode 4 , . . " " . . +, .

dylib , , hello(). , .

+3

All Articles