Cygwin not compiling stod

前端 未结 1 1231
我在风中等你
我在风中等你 2021-01-22 06:42

I\'m trying to compile this example code

#include    // std::cout
#include      // std::string, std::stod

int main ()
{
  std::str         


        
1条回答
  •  长情又很酷
    2021-01-22 07:08

    The short answer is that it's a bug within Cygwin's port of GCC (or libstdc++). The only message I can find on the Cygwin mailing list is from Jan 29, 2014 and it merely says:

    Did you try the suggestion for the same problem under mingw? It looks like this could be a temporary workaround until the problem is fixed. Just make

    sure you try it on /lib/gcc/i686-pc-cygwin/4.8.2/include/c++/bits/basic_string.h if you're building for Cygwin..

    MinGW has been known to have issues with string conversion functions as well, even though it's different from Cygwin. My suggestion is to download Stephan T. Lavavej's 64-bit MinGW distribution which comes with GCC 4.9.1 and many up to date packages.

    0 讨论(0)
提交回复
热议问题