These days I am working on project porting to Mac, which is a Unix-like platform with GCC as the default compiler.
Besides some basic language grammer issues, what we need to care more are API semantic differences, compiler behaviors..
For example, there're some APIs not existed on Mac while Windows offers, or Mac contains a totally different view toward some issue comparing against Windows.And another more complex issue is about compiler, gcc may perform totally different with ms'. In one situation I met yesterday, gcc would cache the compiled binary code and when it
met the same named class in another compiling unit, it will put the cached one into it directly, which may be presumptuous and so cause bugs.
While on the contrary, you could believe what STD does on different platforms because it is protected by standard, if anything behaves differently, you can sue the producer :P
Besides some basic language grammer issues, what we need to care more are API semantic differences, compiler behaviors..
For example, there're some APIs not existed on Mac while Windows offers, or Mac contains a totally different view toward some issue comparing against Windows.And another more complex issue is about compiler, gcc may perform totally different with ms'. In one situation I met yesterday, gcc would cache the compiled binary code and when it
met the same named class in another compiling unit, it will put the cached one into it directly, which may be presumptuous and so cause bugs.
While on the contrary, you could believe what STD does on different platforms because it is protected by standard, if anything behaves differently, you can sue the producer :P
本文探讨了将项目从Windows移植到Mac平台时遇到的问题,包括API差异、编译器行为不同等。特别是对于GCC编译器的行为进行了深入讨论。
5380

被折叠的 条评论
为什么被折叠?



