Coder Social home page Coder Social logo

Comments (22)

ruslanskorb avatar ruslanskorb commented on June 3, 2024

@uestchang What do you mean by module register?
Try to delete content of DerivedData folder - ~/Library/Developer/Xcode/DerivedData/*.
Which version of Xcode do you use?
Could you provide the build log?

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

Hello guys,I try tp clean DerivedData just like u said ,but it didn't work.
My Xcode version is 10.0 (10A255).
The build logs are as follows:

/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:362:28: error: use of undeclared identifier '__tg_promote1'
    } while (maskHeight != floor(maskHeight));
                           ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:56:31: note: expanded from macro 'floor'
#define floor(__x) __tg_floor(__tg_promote1((__x))(__x))
                              ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:403:67: error: use of undeclared identifier '__tg_promote1'
        movementRect.size.width = CGRectGetWidth(maskRect) * fabs(cos(rotationAngle)) + CGRectGetHeight(maskRect) * fabs(sin(rotationAngle));
                                                                  ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:33:27: note: expanded from macro 'cos'
#define cos(__x) __tg_cos(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:403:67: error: use of undeclared identifier '__tg_promote1'
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:33:27: note: expanded from macro 'cos'
#define cos(__x) __tg_cos(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:403:122: error: use of undeclared identifier '__tg_promote1'
        movementRect.size.width = CGRectGetWidth(maskRect) * fabs(cos(rotationAngle)) + CGRectGetHeight(maskRect) * fabs(sin(rotationAngle));
                                                                                                                         ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:36:27: note: expanded from macro 'sin'
#define sin(__x) __tg_sin(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:403:122: error: use of undeclared identifier '__tg_promote1'
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:36:27: note: expanded from macro 'sin'
#define sin(__x) __tg_sin(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:404:69: error: use of undeclared identifier '__tg_promote1'
        movementRect.size.height = CGRectGetHeight(maskRect) * fabs(cos(rotationAngle)) + CGRectGetWidth(maskRect) * fabs(sin(rotationAngle));
                                                                    ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:33:27: note: expanded from macro 'cos'
#define cos(__x) __tg_cos(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:404:69: error: use of undeclared identifier '__tg_promote1'
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:33:27: note: expanded from macro 'cos'
#define cos(__x) __tg_cos(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:404:123: error: use of undeclared identifier '__tg_promote1'
        movementRect.size.height = CGRectGetHeight(maskRect) * fabs(cos(rotationAngle)) + CGRectGetWidth(maskRect) * fabs(sin(rotationAngle));
                                                                                                                          ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:36:27: note: expanded from macro 'sin'
#define sin(__x) __tg_sin(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:404:123: error: use of undeclared identifier '__tg_promote1'
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:36:27: note: expanded from macro 'sin'
#define sin(__x) __tg_sin(__tg_promote1((__x))(__x))
                          ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:409:33: error: use of undeclared identifier '__tg_promote1'
        movementRect.origin.x = floor(CGRectGetMinX(movementRect));
                                ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:56:31: note: expanded from macro 'floor'
#define floor(__x) __tg_floor(__tg_promote1((__x))(__x))
                              ^
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:410:33: error: use of undeclared identifier '__tg_promote1'
        movementRect.origin.y = floor(CGRectGetMinY(movementRect));
                                ^
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/ios/RootViewController.mm:35:
In file included from /Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/RSKImageCropper.h:37:
/Users/mabinhang/IosDemo/build/jsb-default/frameworks/runtime-src/proj.ios_mac/RSKImageCropper.framework/Headers/CGGeometry+RSKImageCropper.h:56:31: note: expanded from macro 'floor'
#define floor(__x) __tg_floor(__tg_promote1((__x))(__x))
                              ^
11 errors generated.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

screenShot 2019-06-14 afternoon 2 50 11

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

image
It's so strange that when I choose the floor and right click and select JumpToDefinition , there are six items were shown;
However, in another project(an single page ios project) which work well,there are only one definition and jumpToDefiniton at <CoreGraphics/CoreGraphics.h> immediately.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

I think that I found out what happen in my project ,in the project which was created by cocos creator engine , the <tgmath.h> is different from the common project.
But i still don't know how to fix this problem :((((

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

screenShot 2019-06-17 afternoon 3 53 38
screenShot2019-06-17 afternoon3 54 14

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

I think .mm extension cause Xcode complier use tgmath.h from C++ V1 instead of clang, but I have to use .mm extension in default.
In fact ,I have try to use .m to instead ,and then another error come up :(( , it seems that .mm extension is necessary for cocos creator project.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

@ruslanskorb Hey bro ,is it possible to use math.h to instead tgmath.h ?
I try my best to fix the problem but all of them didn't work.

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on June 3, 2024

Hi @uestchang! It looks like a configuration problem. Could you try to disable Modules feature in the build settings? https://stackoverflow.com/questions/23333287/tgmath-h-doesnt-work-if-modules-are-enabled

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

@ruslanskorb I had tried to set Modules feature to NO ,it didn't work :( , by the way , I try to change compilers of my app target , also didn't work.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

@ruslanskorb I had tried to set Modules feature to NO ,it didn't work :( , by the way , I try to change compilers of my app target , also didn't work.

In fact , in my wrong project ,the Modules feature is NO in default . In another project which of Modules feature is YES, the cropper work well .

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on June 3, 2024

@uestchang Could you provide a sample project with your problem?

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on June 3, 2024

@uestchang Did you manage to solve the problem?

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

@ruslanskorb I am sorry about the late reply to you .I want to solve the problem ,it is hard and I spent a few days to try ,but it didn't work .
I will send a sample to you tomorrow as well as try to solve it in the meantime.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

proj.ios_mac.zip
@ruslanskorb
This is a sample with the problem.

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on June 3, 2024

@uestchang Your sample project has several missing files and produces errors that are not related to this problem. Please, provide a correct sample.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

@ruslanskorb sorry , i will check it and send a correct sample.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

@ruslanskorb The whole project created by cocos creator is too big which include the engine content. I have compressed it but it's still over 100MB .Owing to this , I can't upload it here.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

https://1drv.ms/u/s!AshYtZMJ4vKjh0I9fwYKiSM0zWMT?e=KIz8CV
@ruslanskorb
I upload the sampleProject.zip file to oneDrive .

The Xcode project path is "SampleProject/build/jsb-default/frameworks/runtime-src/proj.ios_mac"

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on June 3, 2024

@uestchang As a workaround, add the following code to RootViewController.mm after #import <RSKImageCropper/RSKImageCropper.h>:

#undef cos
#undef sin
#undef atan2
#undef pow
#undef sqrt
#undef fabs
#undef ceil
#undef floor
#undef round

from rskimagecropper.

ruslanskorb avatar ruslanskorb commented on June 3, 2024

@uestchang Fixed in 2.2.2.

from rskimagecropper.

uestchang avatar uestchang commented on June 3, 2024

OK ,thank you so much :)))))

from rskimagecropper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.