Issue #9921 has been updated by Marty Plummer.


Heesob Park wrote:
> I guess error messages about gmtime_r must be solved with `#include <ctime>`
> 
> ~~~
> #include <ctime>
> #include <string>
> #include "ruby.h"
> int main() {
>   return(0);
> }
> ~~~
Interesting indeed, I wonder how feasible it would be within my actual program... 


----------------------------------------
Bug #9921: gmtime_r, win32.h, and <string>
https://bugs.ruby-lang.org/issues/9921#change-47092

* Author: Marty Plummer
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: 2.1.2p95
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Found an interesting/annoying issue, using ruby 2.1.2p95 on windows via the msys2 project;
seems there is an issue regarding compiling programs including <string> and "ruby.h" using mingw's g++.
The following test program fails to compile:

#include <string>
#include "ruby.h"
int main() {
  return(0);
}


---Files--------------------------------
g++.log (3.56 KB)
clang++.log (3.59 KB)


-- 
https://bugs.ruby-lang.org/