Updated: gcc-7.3.0-2 (x86/x86_64)

Dai Conrad dai.conrad@gmail.com
Wed May 30 20:31:00 GMT 2018

On Wed, 30 May 2018 11:58 AM, JonY <10walls@gmail.com> wrote:
> Does -static change anything?

Interesting! It succeeds with g++ -std=c++17, and does this with
clang++ -std=c++17:

$ clang++ -std=c++17 -static -Wall -Wextra -O2 -o testa testa.cc
multiple definition of `std::string::_Rep::_S_empty_rep_storage'
first defined here
clang-5.0: error: linker command failed with exit code 1 (use -v to
see invocation)

>> #include <shared_mutex>
> I'm guessing Cygwin does not support the functionality declared in the
> headers yet.

If that were the case, it should not compile with g++ -std=c++11,
gnu++14, or gnu++17,
but it does. Also, a much cleaner error message could be shown with:

#error shared_mutex not supported

in the header file, instead of lots of "pthread_rwlock_* not declared
in this scope".

(Note: the first one, with the std::stringstream, still fails with -std=gnu++17)

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

More information about the Cygwin mailing list