josuigoa / CameraMic

Camera & Microphone OpenFL native extension
32 stars 6 forks source link

ios build fails #5

Open MatthijsKamstra opened 9 years ago

MatthijsKamstra commented 9 years ago

I wanted to test your extension on ios, but it failed: (The example code I used is from https://github.com/josuigoa/CameraMic/tree/master/test_project)

→ lime test ios 
Error: Source path "/usr/lib/haxe/lib/CameraMic/git/ndll/IPhone/libcameramic.iphoneos.a" does not exist

Which is correct, there is no IPhone-folder in ndll-folder. There is probably a command that I need to execute to build that, but I don't know which one.

josuigoa commented 9 years ago

I've been changing the directories structure and I accidentally removed the .a files. Try again please

MatthijsKamstra commented 9 years ago

almost there, I now get this error:

Undefined symbols for architecture arm64:
  "_cameramic_register_prims", referenced from:
      _main in Main.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
josuigoa commented 9 years ago

I can't try today but if you want, remove the existing files under the ndll/iPhone directory. Then, recreate the files running the lime rebuild CameraMic ios command

MatthijsKamstra commented 9 years ago
Error: ./common/CameraMic.cpp:1:10: fatal error: 'Utils.h' file not found
#include "Utils.h"
josuigoa commented 9 years ago

the CameraMic.cpp file was created automatically when the extension was created. Actually I don't use it, I removed it and it's reference in the Build.xml file.

MatthijsKamstra commented 9 years ago

we are getting closer: I deleted the Iphone folder, and rebuilded with lime rebuild CameraMic ios and tried to build it for ios and got this error:

Undefined symbols for architecture arm64:
  "cameramic::StartRecordingAudio()", referenced from:
      cameramic_startrecordingaudio(_value*) in libcameramic.a(e8ed95cb_ExternalInterface.o)
  "cameramic::PlayAudio(char const*)", referenced from:
      cameramic_playaudio(_value*) in libcameramic.a(e8ed95cb_ExternalInterface.o)
  "cameramic::StopRecordingAudio()", referenced from:
      cameramic_stoprecordingaudio() in libcameramic.a(e8ed95cb_ExternalInterface.o)
  "cameramic::TakePhoto()", referenced from:
      cameramic_takephoto(_value*) in libcameramic.a(e8ed95cb_ExternalInterface.o)
  "cameramic::SetAppFilesDirectory(char const*)", referenced from:
      cameramic_setappfilesdirectory(_value*) in libcameramic.a(e8ed95cb_ExternalInterface.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
josuigoa commented 9 years ago

Hi!

I've run the lime rebuild CameraMic ios and then lime test iosand I get the error of no having the certificate. At this moment I haven't the certificate, but I think I must get the error you say before the certificate error.

I've updated again the recompiled *.a files.

hcwdikk commented 9 years ago

I am having the same problem on ios :( Android works fine but on ios it gives me two errors symbol(s) not found for architecture armv7 and symbol(s) not found for architecture arm64. Rebuilding extension doesn't fix this. *.a files included in repository don't work either. Maybe this is a problem with newest openfl/lime?

josuigoa commented 9 years ago

It's been a while since I tried on iOS... I have no license to try it now but I would like to buy one from now to summer, I'll try then. Sorry about that :disappointed:

jeichelbaum commented 8 years ago

having the same issue, iOS build fails for me because of the issue described by @hcwdikk

josuigoa commented 8 years ago

I did this library some years ago, for old OpenFL versions and it's a long time since I changed something here. Probably I'll rewrite this library from scratch but I won't update it for now.