This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why is popen from stdio.h disabled with -std=c++11?


On 2017-01-30 10:41, Пётр Б. wrote:
Why is popen from stdio.h disabled with -std=c++11? I am trying to
grasp it and I can't.

It is exposed if -std=c11 but not for c++11.

No, it's not, you get an implicit function declaration warning in C. C++ is simply less forgiving (which is not a bad thing in this case).

What is the problem and can it be solved?

Use -std=gnu++11, or -D_DEFAULT_SOURCE with -std=c++11.

Why does -std=c++11 prevent POSIX visibility?

Because it means ISO standard C++, which popen is not.

MinGW exposes popen as _popen, could it be an option for Cygwin?

Absolutely not, that is an MSVC-ism.

--
Yaakov

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]