stephan-tolksdorf / STULabel

A faster and more flexible label view for iOS
Other
121 stars 28 forks source link

build fails #1

Closed farfromrefug closed 6 years ago

farfromrefug commented 6 years ago

Using the cocoa pod, the project wont build, i get this error:

In file included from /Volumes/data/dev/nativescript/nativescript-label/dev_demo/platforms/ios/Pods/STULabel/STULabel/STUTextHighlightStyle-Internal.hpp:5:
/Volumes/data/dev/nativescript/nativescript-label/dev_demo/platforms/ios/Pods/STULabel/STULabel/Internal/TextStyle.hpp:178:12: error: no matching constructor for initialization of
      'stu_label::UnderlineStyle'
    return {static_cast<UInt16>(style_ & ~underlineMinYIsStrictBit)};
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/data/dev/nativescript/nativescript-label/dev_demo/platforms/ios/Pods/STULabel/STULabel/Internal/TextStyle.hpp:86:8: note: candidate constructor (the implicit move constructor)
      not viable: no known conversion from 'stu::UInt16' (aka 'unsigned short') to 'stu_label::UnderlineStyle' for 1st argument
struct UnderlineStyle : Parameter<UnderlineStyle, UInt16> {
       ^
/Volumes/data/dev/nativescript/nativescript-label/dev_demo/platforms/ios/Pods/STULabel/STULabel/Internal/TextStyle.hpp:86:8: note: candidate constructor (the implicit copy constructor)
      not viable: no known conversion from 'stu::UInt16' (aka 'unsigned short') to 'const stu_label::UnderlineStyle' for 1st argument
struct UnderlineStyle : Parameter<UnderlineStyle, UInt16> {
       ^
/Volumes/data/dev/nativescript/nativescript-label/dev_demo/platforms/ios/Pods/STULabel/STULabel/Internal/TextStyle.hpp:88:3: note: candidate constructor not viable: no known conversion
      from 'stu::UInt16' (aka 'unsigned short') to 'NSUnderlineStyle' for 1st argument
  UnderlineStyle(NSUnderlineStyle underlineStyle = {})
  ^

Can you help?

stephan-tolksdorf commented 6 years ago

What version of Xcode and CocoaPods are you using? It seems to me that the build is using non-default compiler flags. If you're using Xcode 10.1, could you give me instructions to reproduce the issue or attach a zip with an Xcode workspace that doesn't build?

farfromrefug commented 6 years ago

i am using XCode 9.4.1, pod 1.5.3, and your pod 0.8.1

Well to reproduce you would need to start working with Nativescript. I am trying to use your lib within the framework.

If you are willing to test i can guide you

stephan-tolksdorf commented 6 years ago

This is probably due to using Xcode 9.4.1. I'll see whether I can make STULabel build on that version without larger changes. (STULabelSwift definitely requires Xcode 10.)

stephan-tolksdorf commented 6 years ago

It seems that single line was the only issue on Xcode 9.4.1. Could you try the fix, e.g. by using the master branch version of the pod?

pod 'STULabel', :git => 'https://github.com/stephan-tolksdorf/STULabel.git'
farfromrefug commented 6 years ago

@stephan-tolksdorf it built!! thanks a lot for your effort. Will try your lib now ;)

stephan-tolksdorf commented 6 years ago

Thanks for reporting this! Let me know if you run into any other issue!