commonmark-swift icon indicating copy to clipboard operation
commonmark-swift copied to clipboard

Can't compile in Xcode 10

Open zhouhao27 opened this issue 5 years ago • 3 comments

Got the following error message when compiling:

/Users/Projects/test/MarkDown/MarkDown/ViewController.swift:10:8: No such module 'CommonMark'

Here is my steps to add CommonMark:

  1. Create a single view project
  2. pod init
  3. Add pod 'CommonMark' in my Podfile
  4. pod install
  5. Open workspace
  6. Add import CommonMark in my ViewController.swift

Then got this error message. Any suggestion? Thanks.

zhouhao27 avatar May 21 '19 07:05 zhouhao27

Hm, we currently don't support CocoaPods, you can only install through SPM.

chriseidhof avatar May 21 '19 08:05 chriseidhof

Thanks for your reply. Not familiar with how to use SPM. Any guideline?

I can't compile CommonMark in Xcode project. It shows:

/Users/Projects/test/MarkDown/commonmark-swift/Sources/Ccmark/module.modulemap:2:12: Header '/usr/local/include/cmark.h' not found

Need to install Cmark first?

zhouhao27 avatar May 22 '19 02:05 zhouhao27

Yes, you need cmark installed. So currently it won't work on iOS unless you manually add those files as well.

chriseidhof avatar May 22 '19 07:05 chriseidhof