SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

Answered
0
0

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.

Version
1.2.3
  • You must to post comments
Best Answer
3
0

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

  • You must to post comments
0
0

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) ) ); })
  • Andrew
    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.
  • Igor Peric
    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 to post comments
Showing 2 results
Your Answer

Please first to submit.