Author Topic: Open Curly Brace doesn't work in Mac OS X 10.9  (Read 13931 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Open Curly Brace doesn't work in Mac OS X 10.9
« Reply #15 on: July 13, 2015, 02:51:44 pm »
Thinking that it has something to do with the precompiled headers. Try configure with --disable-pch.

(https://gist.github.com/juanfal/6d2baa88e31ea9f0a0c1)
Code
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)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Open Curly Brace doesn't work in Mac OS X 10.9
« Reply #16 on: July 13, 2015, 07:03:59 pm »
What happens if you try this patch?

Code: diff
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).
« Last Edit: July 13, 2015, 07:27:39 pm by jens »
(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!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Open Curly Brace doesn't work in Mac OS X 10.9
« Reply #17 on: August 04, 2015, 10:32:03 pm »
Has anyone tried my patch?
(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!]

Offline Stashue

  • Single posting newcomer
  • *
  • Posts: 3
Re: Open Curly Brace doesn't work in Mac OS X 10.9
« Reply #18 on: February 12, 2019, 07:03:00 pm »
So what is the final solution to the problem with the braces?  I didn't understand

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Open Curly Brace doesn't work in Mac OS X 10.9
« Reply #19 on: February 12, 2019, 08:48:19 pm »
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!]