
Hi Dominick,
Awesome. Sounds like everything's working perfectly : ). The 'has no
symbols' messages are normal and harmless; I think they can be fixed but in
the meantime there is a script in ghc-ios-scripts called "libtool-quiet"
that silences them. You can use it by adding -pgmlibtool libtool-quiet to
your GHC arguments.
The output just goes to the iPhone's console which is normally shown in
Xcode when you run, but you can also access it with Apple's "iPhone
Configurator" app.
https://itunes.apple.com/us/app/apple-configurator/id434433123?mt=12 .
(You could also modify the example to return e.g. an Int and put that on
the screen with a UILabel or similar -- you can call Haskell from anywhere
in your app as long as you've called hs_init at the very beginning. A nice
trick is to create an NSObject category with a + (void)load { hs_init(NULL,
NULL) } method, which will ensure hs_init is called very early in your
program and then you don't have to worry about it anymore.)
Thanks so much for testing!
Cheers
Luke
On Wed, Feb 5, 2014 at 10:22 AM, Dominick Samperi
[Luke: forgot to forward to list, sorry for the duplicates]
There are two issues:
1. When I build Counter.a I see lots of messages from libtool saying "has no symbols", for example:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: armv7s file:
/usr/local/lib/arm-apple-darwin10-ghc-7.8.20140129/rts-1.0/libHSrts_thr.a(Sanity.thr_o) has no symbols
2. I have not (yet) joined the developer program since I have no plans to deploy to the app store, so instead I have been following the instructions here to deploy to my own device:
http://www.sysrage.net/guides/ios-programming/building-and-running-ios-appli...
Following these instructions I am able to copy HaskellCounter (my name for your test app) to my device, and I see the HaskellCounter icon, but when I start the app I just see a blank screen. Looking at
Counter.hs this is not too surprising, as I see no code that would update the Single View screen? I'm not sure where the output of putStrLn goes when an app is run on the device.
Dominick
On Wed, Feb 5, 2014 at 4:27 AM, Luke Iannini
wrote: Hi Dominick and all,
That's great news!
I've created a README here: https://github.com/ghc-ios/ghc-ios-scripts/blob/master/README.md
Note that the binary posted above is only for the device. I'll post the simulator version shortly along with instructions on how to create fat libraries that contain both simulator and device code.
Please let me know if you have any questions or issues!
Very best Luke
On Tue, Feb 4, 2014 at 11:35 PM, Dominick Samperi
wrote: Hello Luke,
It installed without problems under Mac OS X Mavericks and reports the version correctly. If there is some documentation that you can point me
to
I will test on my simulator and iPhone.
Thanks, Dominick
On Wed, Feb 5, 2014 at 1:36 AM, Luke Iannini
wrote: Hi all,
I believe I've worked around the issues with make binary-dist and cross-compilation.
This should be a working binary for iOS devices
https://github.com/ghc-ios/ghc-ios-scripts/releases/download/7.8-rc1-device/...
Please try ./configure && make install (it should live happily next to your current ghc as arm-apple-darwin10-ghc) and let me know so we can have
a
build ready for 7.8 RC2!
Cheers Luke
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs