As the title mentioned, using macos 12.
example.hpp
extern "C"{
int summation();
}
example.cpp
#include "example.hpp"
extern "C"{
int summation()
{
return 10;
}
}
Then I create an Xcode project->static lib, add example.hpp and example.cpp, configure the build phase to ios only. Click on build, the xcode tell me "build succeeded", but I cannot find any .a file, even in the Xcode/DerivedData/*.
This is the first time I try to build c plugin for unity on ios platform, please forgive my ignorance if any.
Edit : I search the .a file shown in the full path(Image 00) but cannot find anything, color of the plugin is red color, weird
CodePudding user response:
Solution is very simple, I create a new project, add the example.hpp and example.cpp into the project, set build target to ios only, click build, then the .a file is generated, I don't know why this happen, maybe some manipulation ruin the settings.