On 16/02/2016 at 07:42, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ; Mac ;
Language(s) : C++ ; PYTHON ;
---------
Sorry in advance for this "vague" post.
I am really struggling between c++ plugins on a mac and on a pc.
I develop my plugins on a pc (windows 8.1 and vs c++ 2013 express) and then port them to mac (OS X 10.9.5 and Xcode v5.0.2).
On the pc it is working ok, but I am getting weird access violations on my mac.
I suspect my string handling functions.
I can "remove" the error by stripping until I see what is the cause(?).
But I cannot explain it.
E.g. if I stop using a boolean userContent, then it seems ok.
So, I guess I mis-use a pointer somewhere.
Questions:
- does xcode initializes the variables different then vs 2015?
- how important is the string format (unicode, ansi, utf8, etc.)
If so, what to use?
My string functions mostly handles url's with very strange char sequences.
e.g. https://www.google.com/t/@-23.4428956,151.9065836,3a,75y,326.06h,72.87t/data=!3m7!1e1!3m5!1sCWskcsTENXaD8gG-zATA!2e0!3e2!7i13312!8i6656!4m2!3m1!1s0x0:0xf9c543b5a04bbd92!6m1!1e1?hl=en
- are there common issues know when porting from pc to mac?
- I also see that the xcode compiler / linker is more rigid the vs.
What compiler / linker options are important for xcode and for vs?
- are there tools to check the code for non initialized variables, pointers, etc.?
For example, I do not init pos1s.
Would that make a difference between pc and mac?
Bool ret2;
Int32 pos1s; // should this be Int32 pos1s = 0. Or should it be a Int64 (pointer)
String cs;
cs = "usercontent";
ret2 = url.FindFirst(cs, &pos1s, 0);
I know it is a vague post, but hopefully someone can shed some light on it.
-Pim