Permalink
Browse files

Fix MagTek bindings for ARMv7 (thumb and frameworks) and add instruct…

…ion about duplicate symbols in ARMv7
  • Loading branch information...
1 parent 18192f3 commit dd92a07855c73a8b33b0d36bcf9b8316f3b644e5 @spouliot spouliot committed Apr 17, 2012
View
@@ -21,6 +21,19 @@ Sample
The sample program in sample/ is a partial port of MagTek's sample iDynamo
program, it covers about half of the features in it.
+ARMv7 support
+=============
+
+The downloaded static library contains duplicate symbols for ARMv7 that
+results in an error when linking ARMv7 projects (e.g. for an iPad app).
+The fix requires some minor surgery on the static library:
+ * split the .a into both an armv6 and armv7 .a (lipo -thin)
+ * decompress the armv7.a (ar -x)
+ * the duplicate will overwrite themselves, no work required
+ * recompress the armv7.a library (libtool -static)
+ * merge the (old) armv6 and the new armv7 libraries (lip -create)
+ * rebuild the bindings
+
License
=======
@@ -1,4 +1,4 @@
using System;
using MonoTouch.ObjCRuntime;
-[assembly: LinkWith ("libMTSCRA.a", LinkTarget.ArmV6 | LinkTarget.ArmV7, "-ObjC -lc++", Frameworks = "ExternalAccessory", ForceLoad = true, IsCxx = true)]
+[assembly: LinkWith ("libMTSCRA.a", LinkTarget.ArmV6 | LinkTarget.ArmV7 | LinkTarget.Thumb, "-lc++", Frameworks = "AudioToolbox CoreGraphics ExternalAccessory", ForceLoad = true, IsCxx = true)]
Binary file not shown.
@@ -8,7 +8,7 @@ $(ZIP_VERSION).zip:
curl http://www.magtek.com/support/software/downloads/sw/$@ > $@
libMTSCRA.a: $(ZIP_VERSION).zip
- unzip -p $< '$(ZIP_VERSION)-$(UNZIP_VERSION)/Library/libMTSCRA.a' > $@
+ unzip -p $< 'Library/libMTSCRA.a' > $@
MagTek.iDynamo.dll: Makefile MagTek.iDynamo.cs enums.cs AssemblyInfo.cs libMTSCRA.a
$(BTOUCH) -out:$@ MagTek.iDynamo.cs -s:enums.cs -x:AssemblyInfo.cs --link-with=libMTSCRA.a,libMTSCRA.a
@@ -9,7 +9,7 @@
<string>icon.png</string>
</array>
<key>CFBundleIdentifier</key>
- <string>com.magtek.demo.scra</string>
+ <string>com.magtek.demo.scra.monotouch</string>
<key>CFBundleVersion</key>
<string>1.0.0.9</string>
<key>MinimumOSVersion</key>

0 comments on commit dd92a07

Please sign in to comment.