diff --git a/AUTHORS b/AUTHORS index 040ce80f71..ee3900d46f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -831,6 +831,7 @@ Developers: Fixed incompatible pointer conversion in external/chipmunk/src/cpArray.c Fixed memory leak in 'Image' Fixed loosing precision when using 'recv' in 'Console' + Fixed link error with Xcode 6 when building with 32-bit architecture ololomax Fixed a potential crash in SceneReader::createNodeWithSceneFile diff --git a/CHANGELOG b/CHANGELOG index d5966bd062..87878879da 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ cocos2d-x-3.2 ??? [FIX] Lua-binding: compiling error on release mode [FIX] Lua-binding: Add xxtea encrypt support [FIX] Node: setPhysicsBody() can not work correctly if it is added to a Node + [FIX] Other: link error with Xcode 6 when building with 32-bit architecture [FIX] Repeat: will run one more over in rare situations [FIX] Scale9Sprite: support culling [FIX] Schedule: schedulePerFrame() can not be called twice diff --git a/cocos/base/ccTypes.h b/cocos/base/ccTypes.h index f447c4de5b..a8d5f62d96 100644 --- a/cocos/base/ccTypes.h +++ b/cocos/base/ccTypes.h @@ -328,7 +328,7 @@ struct BlendFunc bool operator<(const BlendFunc &a) const { - return src < a.src || (src < a.src && dst < a.dst); + return src < a.src || (src == a.src && dst < a.dst); } }; diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index 44de338ef4..f4c8604b3a 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -39,6 +39,26 @@ THE SOFTWARE. extern "C" { + // To resolve link error when building 32bits with Xcode 6. + // More information please refer to the discussion in https://github.com/cocos2d/cocos2d-x/pull/6986 +#if defined(__APPLE__) || defined(__unix) +#ifndef __ENABLE_COMPATIBILITY_WITH_UNIX_2003__ +#define __ENABLE_COMPATIBILITY_WITH_UNIX_2003__ +#include + FILE *fopen$UNIX2003( const char *filename, const char *mode ) + { + return fopen(filename, mode); + } + size_t fwrite$UNIX2003( const void *a, size_t b, size_t c, FILE *d ) + { + return fwrite(a, b, c, d); + } + char *strerror$UNIX2003( int errnum ) + { + return strerror(errnum); + } +#endif +#endif #include "png.h" #include "tiffio.h" #include "base/etc1.h" diff --git a/cocos/ui/UILayout.h b/cocos/ui/UILayout.h index 01f24405ed..6c77939185 100644 --- a/cocos/ui/UILayout.h +++ b/cocos/ui/UILayout.h @@ -56,7 +56,12 @@ public: * @js NA * @lua NA */ - +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) +#ifdef RELATIVE +#undef RELATIVE +#endif +#endif + class Layout : public Widget, public LayoutProtocol { diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj b/cocos/ui/proj.wp8/libGUI.vcxproj index 55f544b422..8d1c2be4b0 100644 --- a/cocos/ui/proj.wp8/libGUI.vcxproj +++ b/cocos/ui/proj.wp8/libGUI.vcxproj @@ -186,6 +186,7 @@ + @@ -210,6 +211,7 @@ + \ No newline at end of file diff --git a/cocos/ui/proj.wp8/libGUI.vcxproj.filters b/cocos/ui/proj.wp8/libGUI.vcxproj.filters index 9a791f39e7..e0a50c8764 100644 --- a/cocos/ui/proj.wp8/libGUI.vcxproj.filters +++ b/cocos/ui/proj.wp8/libGUI.vcxproj.filters @@ -84,6 +84,9 @@ Layouts + + Layouts + @@ -152,5 +155,8 @@ Layouts + + Layouts + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj b/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj index 04098c2456..bedb6cbb2c 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj +++ b/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj @@ -203,11 +203,11 @@ - - - - - + + + + + @@ -218,12 +218,12 @@ - - - - - - + + + + + + diff --git a/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj.filters b/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj.filters index f742759eaf..645eb00360 100644 --- a/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj.filters +++ b/templates/cpp-template-default/proj.wp8-xaml/HelloCppComponent/HelloCppComponent.vcxproj.filters @@ -1,11 +1,11 @@  - - - - - + + + + + Classes @@ -15,12 +15,12 @@ - - - - - - + + + + + + Classes