Tuesday, January 24, 2017

Cef/Chromium Linker Issues on MAC


Hi All,

I somehow deleted my Cefclient Helper Target. When I decided to make helper target by making a duplicate of  Cefclient Target then faced some issues which are listed below along with their solutions that are quite generic and can be applied anywhere with similar issues.


System Info:
OSX : 10.11.6
XCode : 8.1


Error :
Undefined symbols for architecture x86_64 + "_main", referenced from: implicit entry/start for main executable

Solution :
  • Main method is either commented or missing. Plz add
  • int main(int argc, char * argv[])


Error :
 cef::logging::LogMessage::LogMessage(char const*, int, std::string*) in libcef_dll_wrapper.a(cef_logging.o)
      cef::logging::LogMessage::LogMessage(char const*, int, int, std::string*) in libcef_dll_wrapper.a(cef_logging.o)
      cef::logging::ErrnoLogMessage::~ErrnoLogMessage() in libcef_dll_wrapper.a(cef_logging.o)
libcef_dll_wrapper.a 
ld:symbol(s) not found for x86_64

Solution :
  • C++ Standard Library: libc++ (LLVM C++ standard library with C++11 support)
  • This value should be same for both Library and targets.
  • In my case it was different for my Helper Target.
  • Remember to set the correct architecture.


Hope its helpful :)



Sunday, January 22, 2017

FFMPEG Binary in OSX Package


Hiiiiii All,
Spent my last working day to solve issue related to packaging of FFMPEG binary in OSX release build.Every time i made a package its build correctly but the moment when FFMPEG binary is invoked i get error :

CMSampleBufferGetImageBuffer signalled err=-12731(kCMSampleBufferError_RequiredParameterMissing)

So the way to avoid this error we have to do following steps :
  • Project Settings
  • Click Target
  • Click Capabilities
  • Enable App-Sandbox
  • A file is added in project named Target.entitlements

Inside Entitlements file add following info :
  • com.apple.security.inherit [Boolean] YES
  • App Sandbox [Boolean] YES

Also add a RunScript in Target's Build Phase:

codesign -f -s "your certificate" 
--entitlements ./ffmpeg.entitlements 
./Build/Intermediates/ArchiveIntermediates/App\ Store/InstallationBuildProductsLocation/Applications/<my app>/Contents/MacOS/ffmpeg


Hope it hepls :)