Project

General

Profile

Bug #9921

gmtime_r, win32.h, and <string>

Added by ntzrmtthihu777 (Marty Plummer) over 5 years ago. Updated over 5 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
2.1.2p95
[ruby-core:63001]

Description

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 and "ruby.h" using mingw's g++.
The following test program fails to compile:

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


Files

g++.log (3.56 KB) g++.log error log ntzrmtthihu777 (Marty Plummer), 06/08/2014 11:27 PM
clang++.log (3.59 KB) clang++.log compiled with clang++ for additional error output. ntzrmtthihu777 (Marty Plummer), 06/08/2014 11:27 PM

History

Updated by phasis68 (Heesob Park) over 5 years ago

I guess error messages about gmtime_r must be solved with #include <ctime>

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

Updated by ntzrmtthihu777 (Marty Plummer) over 5 years ago

Interesting indeed, I wonder how feasible it would be within my actual program...
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);
}

Also available in: Atom PDF