realpath() function not declared in scope when "-std=c++11" option added to g++

MyBig SpamEmail
Wed Mar 2 06:58:00 GMT 2016

Compiling the following code in test.cpp:

#include <limits.h>
#include <stdlib.h>

int main ( void )
        realpath ( "//.", NULL );
        return 0;

This works:
% g++ test.cpp

This doesn't:
% g++ -std=c++11 test.cpp
test.cpp: In function ‘int main()’:
test.cpp:8:25: error: ‘realpath’ was not declared in this scope
  realpath ( "//.", NULL );

Is this expected behavior?

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list