Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapping Framework on latest MacOS ? #87

Open
Frobitz66 opened this issue Feb 14, 2018 · 2 comments
Open

Wrapping Framework on latest MacOS ? #87

Frobitz66 opened this issue Feb 14, 2018 · 2 comments

Comments

@Frobitz66
Copy link

Disclaimer: I'm a total noob at this so please bear with me.

I've build c2ffi and am trying to figure out how to use cl-autowrap to wrap the MacOS (10.13.x) "ScriptingBridge" framework.

Here's a snapshot of what I'm running up against:

$ ccl
Clozure Common Lisp Version 1.11.5/v1.11.5  (DarwinX8664)

For more information about CCL, please see http://ccl.clozure.com.

CCL is free software.  It is distributed under the terms of the Apache
Licence, Version 2.0.
? (ql:quickload cl-autoload)
> Error: Unbound variable: CL-AUTOLOAD
> While executing: CCL::CHEAP-EVAL-IN-ENVIRONMENT, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Retry getting the value of CL-AUTOLOAD.
> Type :? for other options.
1 > :pop

? (ql:quickload :cl-autowrap)
To load "cl-autowrap":
  Load 1 ASDF system:
    cl-autowrap
; Loading "cl-autowrap"

(:CL-AUTOWRAP)
? (autowrap:c-include "/System/Library/Frameworks/ScriptingBridge.framework/Headers/SBApplication.h")
> Error: Invalid JSON literal name: INF [in #<BASIC-FILE-CHARACTER-INPUT-STREAM ("SBApplication.x86_64-apple-darwin9.spec"/4 UTF-8) #x3020010EC55D> at position 8067018]
> While executing: JSON:JSON-SYNTAX-ERROR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :pop

A couple of questions:

  1. Am I using c-include correctly?
  2. Has anyone been able to wrap any MacOS framework? It'd be awful nice if there was a handy example.

TIA,
T.S. Abdallah

@Frobitz66 Frobitz66 changed the title build on latest MacOS ? Wrapping Framework on latest MacOS ? Feb 14, 2018
@rpav
Copy link
Owner

rpav commented Feb 26, 2018

Sorry for the delay, but I just merged the PR for c2ffi which should fix this. Should be in both 4 and 5 branches. That said you're going to get a string "inf" or similar, but it's probably not something you'll be using in any case.

@Frobitz66
Copy link
Author

Frobitz66 commented Feb 27, 2018

Thanks for the response. I am indeed getting the "Invalid JSON name: INF ..." message. Is it safe to [*ABORT] Return to SLIME's top level" at this point?

UPDATE: The problem is caused by the "value" of "LDBL_MAX" being set to the string INF rather than a number in the JSON spec file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants