cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Archicad C++ API
About Archicad add-on development using the C++ API.

Compile error on Mac

dushyant
Enthusiast

Hi, 

I'm getting a compile error on Mac:

 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/locale:2827:22: no member named 'GS_realloc' in namespace 'std'; did you mean simply 'GS_realloc'?

    _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);

The same code compiles fine with MSVC on windows.

Anyone faced this error?

 

Thanks.

21 REPLIES 21

Try the shortcut trick to "fool" your Xcode into the right path, it might work, the internal files if not the same are very similar and will still work. 

I'd believe it has something to do with how the template made with cmake forces the compiler to restrict the compilation at this point.

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil

Something that worked for me is to create a .pch (precompiled header file) with this content:

 

#include "GSRoot.hpp"

namespace std {
void* GS_realloc (void *userData, size_t newSize);
}