The SciChartDemo compiles and runs just fine out of the box. If I change any of the .m files from “Objective-C” to “Objective-C++” and try to compile I have a linker error:
No matching function for call to ‘SCI_constructGenericType’
Expanded from macro ‘SCIGeneric’
Candidate function not viable: no known conversion from ‘const char [2]’ to ‘char *’ for 2nd argument
If I cast 2nd argument in the macro to (char *) I get the following error:
“SCI_constructGenericType(void*, char*)”
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Am I mistaken if I believe that this has to do something with C++ name mangling? More specifically: how can I use SCIGeneric(x) macro in Objective-C++ file?
Thanks.
- Igor Peric asked 7 years ago
- You must login to post comments
Hi, Igor. I’ve fixed the problem with objective-c++. You can find the fix in new version of our framework.
http://www.scichart.com/Downloads/iOS/v1.2/SciChart_iOS_v1.2.4.1268_SDK.zip
- Mykola Hrybeniuk answered 7 years ago
-
Thanks, great to hear that! :)
-
Hi, Igor We’ve found some new troubles which are related with the fix. Please, download new version https://www.scichart.com/Downloads/iOS/v1.2/SciChart_iOS_v1.2.4.1293_SDK.zip Best regards, Mykola
- You must login to post comments
Promising results when wrapping include statement for SciChart headers this way:
extern "C"
{
#import <SciChart/SciChart.h>
};
Besides this, SCIGeneric ( x ) macro in SCIGenericType.h had to be changed from this:
#define SCIGeneric(x) ({ typeof(x) _x = (x); SCI_constructGenericType( &_x, @encode( typeof (_x) ) ); })
to this:
#define SCIGeneric(x) ({ typeof(x) _x = (x); SCI_constructGenericType( &_x, (char*)@encode( typeof (_x) ) ); })
- Igor Peric answered 7 years ago
-
Hi Igor, I believe Mykola on our team is working to integrate a fix to the v1.x and v2.x branches of SciChart iOS. Thanks for notifying us and for your contribution. We’ll update you once this is published.
-
Hi Andrew, I have been using fix by Mykola in 1.x version. Today I switched to 2.0 and it seems to me you didn’t include this macro fix (cast to char*) in 2.0 branch.
- You must login to post comments
Please login first to submit.