News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Open Curly Brace doesn't work in Mac OS X 10.9

Started by eguerr, August 03, 2014, 09:53:31 PM

Previous topic - Next topic

afb

Thinking that it has something to do with the precompiled headers. Try configure with --disable-pch.

(https://gist.github.com/juanfal/6d2baa88e31ea9f0a0c1)

In file included from ../../../src/include/sdk.h:17:
In file included from ../../../src/include/sdk_precomp.h:13:
In file included from ../../../src/include/sdk_common.h:43:
../../../src/include/prep.h:33:75: error: use of overloaded operator '==' is ambiguous (with operand types 'const std::__1::shared_ptr<GDBWatch>' and
      'int')
        template<typename T> bool equals(T const& rhs) const { return rhs == 0; }
                                                                      ~~~ ^  ~


You might also want to configure with --enable-std_string when compiling wxWidgets with clang++.


See also http://sourceforge.net/p/codeblocks/tickets/13/
(it contains some more details, from the macports port)

oBFusCATed

#16
What happens if you try this patch?

Code (diff) Select

diff --git a/src/include/prep.h b/src/include/prep.h
index 7e114a0..81fbf86 100644
--- a/src/include/prep.h
+++ b/src/include/prep.h
@@ -17,8 +17,17 @@
     #define __has_feature(x) 0
#endif

-#if    !(((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) && defined __GXX_EXPERIMENTAL_CXX0X__) \
-    && !(defined(__clang__) && __has_feature(cxx_nullptr))
+#if __cplusplus>=201103L
+    #define CB_HAS_NULLPTR 1
+#elif ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) && defined __GXX_EXPERIMENTAL_CXX0X__
+    #define CB_HAS_NULLPTR 1
+#elif defined(__clang__) && __has_feature(cxx_nullptr)
+    #define CB_HAS_NULLPTR 1
+#else
+    #define CB_HAS_NULLPTR 0
+#endif
+
+#if CB_HAS_NULLPTR!=1diff --git a/src/include/prep.h b/src/include/prep.h
index 7e114a0..81fbf86 100644
--- a/src/include/prep.h
+++ b/src/include/prep.h
@@ -17,8 +17,17 @@
     #define __has_feature(x) 0
#endif

-#if    !(((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) && defined __GXX_EXPERIMENTAL_CXX0X__) \
-    && !(defined(__clang__) && __has_feature(cxx_nullptr))
+#if __cplusplus>=201103L
+    #define CB_HAS_NULLPTR 1
+#elif ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) && defined __GXX_EXPERIMENTAL_CXX0X__
+    #define CB_HAS_NULLPTR 1
+#elif defined(__clang__) && __has_feature(cxx_nullptr)
+    #define CB_HAS_NULLPTR 1
+#else
+    #define CB_HAS_NULLPTR 0
+#endif
+
+#if CB_HAS_NULLPTR!=1
     // it is a const object...
     const class nullptr_t
     {

     // it is a const object...
     const class nullptr_t
     {


Also what c++ stdlib are you using - libc++ or libstdc++?
The former is the only way to get c++11 features on osx as far as I know and also it is always building in c++11 mode.

Mixing the two is probably bad idea. Also I think people building on OSX should try to use libc++, c++11 and wxCocoa-3.x.
Trying to use the old wx is a waste of time in my opinion.

And lastly cb core seems to build fine with gcc-4.8.5, -std=c++11 and no -ansi flag (passing -ansi and -std=c++11, causes lots of problems).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Stashue

So what is the final solution to the problem with the braces?  I didn't understand

oBFusCATed

Have you tried the latest night build? See the night build subforum. There are new builds.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]