payload: {"action":"created","issue":{"url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/issues/92","repository_url":"https://api.github.com/repos/fletcher/MultiMarkdown-6","labels_url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/issues/92/comments","events_url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/issues/92/events","html_url":"https://github.com/fletcher/MultiMarkdown-6/issues/92","id":266176056,"node_id":"MDU6SXNzdWUyNjYxNzYwNTY=","number":92,"title":"How to import the libMultiMarkdown.framework in Xcode projects","user":{"login":"DivineDominion","id":59080,"node_id":"MDQ6VXNlcjU5MDgw","avatar_url":"https://avatars3.githubusercontent.com/u/59080?v=4","gravatar_id":"","url":"https://api.github.com/users/DivineDominion","html_url":"https://github.com/DivineDominion","followers_url":"https://api.github.com/users/DivineDominion/followers","following_url":"https://api.github.com/users/DivineDominion/following{/other_user}","gists_url":"https://api.github.com/users/DivineDominion/gists{/gist_id}","starred_url":"https://api.github.com/users/DivineDominion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DivineDominion/subscriptions","organizations_url":"https://api.github.com/users/DivineDominion/orgs","repos_url":"https://api.github.com/users/DivineDominion/repos","events_url":"https://api.github.com/users/DivineDominion/events{/privacy}","received_events_url":"https://api.github.com/users/DivineDominion/received_events","type":"User","site_admin":false},"labels":[{"id":521463248,"node_id":"MDU6TGFiZWw1MjE0NjMyNDg=","url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-10-17T15:39:10Z","updated_at":"2019-05-26T12:00:52Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I managed to get the Xcode project to build and emit a .framework file:\r\n\r\n```\r\nmake\r\ncd build\r\nmake\r\ncd ..\r\nmake xcode\r\n```\r\n\r\n... then open the Xcode project and build the framework target. The result, for reference, as Zip:\r\n[libMultiMarkdown.framework.zip](https://github.com/fletcher/MultiMarkdown-6/files/1391575/libMultiMarkdown.framework.zip)\r\n\r\nI then embed it in a Cocoa test app as usual (embed & link). However, I fail to import the code in Swift, so I fall back to Objective-C, and still no luck:\r\n\r\n- `@import libMultiMarkdown;` -- \"Module 'libMultiMarkdown' not found\"\r\n- `#import <libMultiMarkdown.framework>` -- file not found (although it is recognized as a framework in Xcode's auto-completion and I can traverse the paths)\r\n- `#import <libMultiMarkdown.framework/libMultiMardown>` produces errors because of non-UTF-8 characters (probably because that's a binary file and import tries to, well, import it as source)\r\n\r\nWhat does compile:\r\n\r\n    #import \"libMultiMarkdown.framework/Versions/Current/include/libMultiMarkdown/libMultiMarkdown.h\"\r\n\r\nBut that looks bananas. :) Is it supposed to be like this?\r\n\r\nEven though Xcode's source code/SyntaxKit now recognizes the functions like `token_pool_init()`, the linker does not find them, so something is clearly broken in terms of project setup.\r\n\r\n## Code\r\n\r\n```objc\r\n#import \"TestObject.h\"\r\n#import \"libMultiMarkdown.framework/Versions/Current/include/libMultiMarkdown/libMultiMarkdown.h\"\r\n#import \"libMultiMarkdown.framework/Versions/Current/include/libMultiMarkdown/token.h\"\r\n#import \"libMultiMarkdown.framework/Versions/Current/include/libMultiMarkdown/d_string.h\"\r\n\r\n@implementation TestObject\r\n- (instancetype)init\r\n{\r\n    self = [super init];\r\n    if (self) {\r\n        NSLog(@\"hi\");\r\n        token_pool_init();\r\n    }\r\n    return self;\r\n}\r\n@end\r\n```\r\n\r\n### Error\r\n\r\n```\r\nUndefined symbols for architecture x86_64:\r\n  \"_token_pool_init\", referenced from:\r\n      -[TestObject init] in TestObject.o\r\nld: symbol(s) not found for architecture x86_64\r\n```\r\n\r\n---\r\n\r\nAre there any additional steps I need to adhere to?"},"comment":{"url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/issues/comments/495993920","html_url":"https://github.com/fletcher/MultiMarkdown-6/issues/92#issuecomment-495993920","issue_url":"https://api.github.com/repos/fletcher/MultiMarkdown-6/issues/92","id":495993920,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5NTk5MzkyMA==","user":{"login":"fletcher","id":97321,"node_id":"MDQ6VXNlcjk3MzIx","avatar_url":"https://avatars2.githubusercontent.com/u/97321?v=4","gravatar_id":"","url":"https://api.github.com/users/fletcher","html_url":"https://github.com/fletcher","followers_url":"https://api.github.com/users/fletcher/followers","following_url":"https://api.github.com/users/fletcher/following{/other_user}","gists_url":"https://api.github.com/users/fletcher/gists{/gist_id}","starred_url":"https://api.github.com/users/fletcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletcher/subscriptions","organizations_url":"https://api.github.com/users/fletcher/orgs","repos_url":"https://api.github.com/users/fletcher/repos","events_url":"https://api.github.com/users/fletcher/events{/privacy}","received_events_url":"https://api.github.com/users/fletcher/received_events","type":"User","site_admin":false},"created_at":"2019-05-26T12:00:52Z","updated_at":"2019-05-26T12:00:52Z","author_association":"OWNER","body":"1) I'm not sure that you can add an independent program as a dependency like that.  If all you want is to include a copy of multimarkdown inside your app, why not build it separately and do that?  Otherwise, remove `multimarkdown` and leave `libMultiMarkdown`.  If you really want to build a command line program and include the program as a separate resource in your own app, then you'll have to figure out how to do that in Xcode.  But that's separate from getting MMD itself to compile and run.\r\n\r\n2) Make sure to follow step 5 in my list above.  You didn't mention doing that.\r\n\r\n3) Compiles just fine for me if I otherwise follow your directions.\r\n\r\n4) If I then also include libMultiMarkdown in the \"Link Binary with libraries\" I can start using it.  Since I want to use libCurl to support loading remote images and other assets, I also link to the libcurl.tbd binary in the \"top-level\" application and I'm off and running. "}}
other: {"actor":{"display_login":"fletcher"}}