Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upBuild broken in Code::Blocks. #11293
Comments
Rivet-the-Zombie
added
the
<Bug>
label
Feb 17, 2015
This comment has been minimized.
This comment has been minimized.
|
Been out for a few days: MinGW32 issue. I've been running the Backup Compiler. Sick of having to make the same argument repeatedly. |
Rivet-the-Zombie
added this to the 0.C milestone
Feb 17, 2015
This comment has been minimized.
This comment has been minimized.
|
Looking into it. |
This comment has been minimized.
This comment has been minimized.
|
Hmm, clearly std::set does have emplace: http://en.cppreference.com/w/cpp/container/set . |
This comment has been minimized.
This comment has been minimized.
|
If this is indeed related to mingw using an older version of GCC, a fix would be to use |
This comment has been minimized.
This comment has been minimized.
|
Looks like it's fixed as of GCC 4.8? |
This comment has been minimized.
This comment has been minimized.
|
This error was fixed in later versions of the GCC than what CBP comes with. I was able to fix this error by downloading and installing the latest GCC release (4.9.2) from TDM-GCC's website. When I changed the compiler path to the install path of that program, the error went away and the code compiled. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, it's an older/incomplete version of GCC (which, strangely enough, doesn't affect the Cygwin build the usual victim of these type of problems :P). From what I could see the answer is exactly as Matt outlined it, just download and install a newer version of GCC. |
This comment has been minimized.
This comment has been minimized.
|
To further clarify, download the 32-bit version. Also, the path that needs to be changed in CBP is here: Setting->Compiler->Toolchain Executables tab. Change the "Compiler's installation directory" to the bin folder where TDM-GCC was installed. For example, mine is C:\Program Files (x86)\TDM-GCC-32\bin. |
This comment has been minimized.
This comment has been minimized.
|
I had to update C::B at the same time to make it work, but @MattAmmann's fix worked for me. This still seems like a bit of a hurdle for new contributors to cross. Is there no better alternative? |
This comment has been minimized.
This comment has been minimized.
Changing the code would be preferable. |
This comment has been minimized.
This comment has been minimized.
|
Yea, emplace isn't THAT magical an interface that it's worth making new
contributor's lives harder.
|
This comment has been minimized.
This comment has been minimized.
|
Removed call to set.emplace(). |
Rivet-the-Zombie commentedFeb 17, 2015
Ugly brick of error code:
||=== Build: Release in Cataclysm (compiler: GNU GCC Compiler) ===
C:\CDDA\src\json.h||In instantiation of 'bool JsonIn::read(T&) [with T = std::setstd::basic_string; typename std::enable_if<std::is_same<typename T::key_type, typename T::value_type>::value, void>::type* = 0u]':
C:\CDDA\src\json.h|594|required from 'bool JsonObject::read(const string&, T&) [with T = std::setstd::basic_string; std::string = std::basic_string]'
C:\CDDA\src\savegame_json.cpp|1090|required from here
C:\CDDA\src\json.h|268|error: 'class std::setstd::basic_string' has no member named 'emplace'
C:\CDDA\src\json.h||In instantiation of 'bool JsonIn::read(T&) [with T = std::set; typename std::enable_if<std::is_same<typename T::key_type, typename T::value_type>::value, void>::type* = 0u]':
C:\CDDA\src\json.h|594|required from 'bool JsonObject::read(const string&, T&) [with T = std::set; std::string = std::basic_string]'
C:\CDDA\src\savegame_json.cpp|1351|required from here
C:\CDDA\src\json.h|268|error: 'class std::set' has no member named 'emplace'
||=== Build failed: 2 error(s), 6 warning(s) (7 minute(s), 23 second(s)) ===