-
Notifications
You must be signed in to change notification settings - Fork 472
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
'Use of undeclared identifier '__tg_promote1'' error in Objective-C++ project #210
Comments
@uestchang What do you mean by module register? |
Hello guys,I try tp clean DerivedData just like u said ,but it didn't work.
|
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. |
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. |
@ruslanskorb Hey bro ,is it possible to use math.h to instead tgmath.h ? |
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 |
@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 . |
@uestchang Could you provide a sample project with your problem? |
@uestchang Did you manage to solve the problem? |
@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 . |
proj.ios_mac.zip |
@uestchang Your sample project has several missing files and produces errors that are not related to this problem. Please, provide a correct sample. |
@ruslanskorb sorry , i will check it and send a correct sample. |
@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. |
https://1drv.ms/u/s!AshYtZMJ4vKjh0I9fwYKiSM0zWMT?e=KIz8CV The Xcode project path is "SampleProject/build/jsb-default/frameworks/runtime-src/proj.ios_mac" |
@uestchang As a workaround, add the following code to #undef cos
#undef sin
#undef atan2
#undef pow
#undef sqrt
#undef fabs
#undef ceil
#undef floor
#undef round |
@uestchang Fixed in 2.2.2. |
OK ,thank you so much :))))) |
I have to use the project which is created by cocos creator , and the project include a module register so that i can't use < tgmath.h >.
The error of Xcode is" Use of undeclared identifier '__tg_promote1' "and"Expanded from macro 'floor' ".
I have no idea about how to work around and redeclaring the things ,please help me.
Your help is greatly appreciated .
:)
The text was updated successfully, but these errors were encountered: