develooper Front page | perl.perl5.porters | Postings from January 2015

Problems using perl headers with C++

Thread Next
From:
Олег Пронин
Date:
January 29, 2015 17:45
Subject:
Problems using perl headers with C++
Message ID:
CABFBc47uDpiMVFtXy_6m5YN_0Xs6goWetPZ=tJhTy5-zG+7BYA@mail.gmail.com
1) On windows, you can't include ostream after perl's headers.
c:\strawberry\c\bin\../lib/gcc/x86_64-w64-mingw32/4.7.3/include/c++/ostream:333:49:
error: macro "PerlLIO_write" requires 3 arguments, but only 2 given
c:\strawberry\c\bin\../lib/gcc/x86_64-w64-mingw32/4.7.3/include/c++/istream:484:42:
error: macro "PerlLIO_read" requires 3 arguments, but only 2 given

That's because perl defines 'read' and 'write' macro for windows.

2) Unable to use std::vector with -std=c++11, because in bits/random.h
there are calls to seed() method. Perl defines macro 'seed'.

Are we gonna do something with all of these?
IMHO marcos are big evil. If we use it, let's give them some
non-conflicting names.

-- 
Oleg Pronin,
CTO, Co-Founder,
Crazy Panda LTD
CP Decision LTD

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About