list of differences between mac and win ?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/10/2008 at 09:16, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) : C++ ;---------
Hi,i have code that works on windows, but diesnt seem to work correctly on mac. it compiles fine on mac, but the plugin behaviour is different..
in my plugin i create polys with the mouse.
on pc all works fine, on mac only every second one gets created... im using a the c++ vector template class here and there to store some info, should this be a problem on a mac?So I wonder what i should look out for when i code on a windows pc and later compile the code for mac.
- i know about endianness, but that shouldnt be a problem, as this is not related to writing to disk.
- i know about path names, that on an old mac, the sepetrator would be ':' instead of '/'.
what else is there that is diffrerent on macs ?
i suppose all sdk functions should work fine on both systems .. ?
im using the % operator sometimes to compute a remaindershould i use Modulo() instead ?
can you give me some hints please what i should look out for / what common ptfalls are ?
Maybe a list exists somewhere for reference ?
thanks,
Daniel -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/10/2008 at 09:22, xxxxxxxx wrote:
As long as you use standard C++ and the SDK functions only, then (except for the changes you mentioned, but Kuro should know more about these) there should be no difference at all.
I for example have code containing about 80.000 lines of code and I simply copy it over and hit the compile button. No problem at all.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/10/2008 at 11:10, xxxxxxxx wrote:
Unless you need to construct your own file paths from strings (instead of getting paths from BrowseFiles and Filename), you won't have to worry about path separators. If you do, it is really just a matter of determining the OS and substituting :\, :, / in the proper situations. I have code for this if needed.
Besides that, there are minor differences such as 64-bit value assignments. In Windows 64-bit, long int is 32-bit but on MacOS 64-bit (Leopard), int is 32-bit. In these cases, %ld and %d are treated differently in standard string formatting arguments. See: My PluginCafe Topic.
Your issue with the C++ Vector template may be an implementation difference between Windows C++ (VisualStudio) and MacOS C++ (CodeWarrior/Xcode) libraries. Unfortunately, STL implementations are interpretive along guidelines rather than standardized for cross-platform similarities. I donot use C++ STL for C4D plugin development for various reasons.
On the other hand, standard C/C++ keywords and operators should work identically across platforms. Though I'd suggest finding a reference (online) for any possible differences at this level, say, for IEEE floating point variances between PPC and Intel processors. Also be sure to avoid platform-dependent implementations when working cross-platform (wchar_t() from Windows, for instance). Any extension classes or methods that resemble each other between Windows and MacOS are not guaranteed to function similarly.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/10/2008 at 11:42, xxxxxxxx wrote:
Just to add here, I cannot confirm any real differences of the vector template class or the STL in general on MAC and PC. It´s working very identical here (there are performance differences if I remember my last tests correctly, but nothing worse so far). Actually I am using it quite a lot, never had issues with it.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/10/2008 at 13:46, xxxxxxxx wrote:
Hi and thanks for your answers.
I just re-wrote large parts of the plugin, so i couldnt really tell if the problem was indeed related to using the stl vector class.
Thanks very much for the info you provided, it's sure to be valuable for me if i should have any more problems with my mac compiles.
greetings,
Daniel