Bug 75222 - kbabel common/libgettext compile error
Summary: kbabel common/libgettext compile error
Status: RESOLVED DUPLICATE of bug 62895
Alias: None
Product: kbabel
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stanislav Visnovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-14 13:32 UTC by Martin Piskernig
Modified: 2004-03-04 18:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Piskernig 2004-02-14 13:32:02 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 3.3.3 20040125 (prerelease) (Debian) 
OS:          Linux

In kdesdk/kbabel/common/libgettext from KDE_3_2_BRANCH CVS I get:

if /bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../..   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT pofiles.lo -MD -MP -MF ".deps/pofiles.Tpo" \
  -c -o pofiles.lo `test -f 'pofiles.cc' || echo './'`pofiles.cc; \
then mv -f ".deps/pofiles.Tpo" ".deps/pofiles.Plo"; \
else rm -f ".deps/pofiles.Tpo"; exit 1; \
fi
pofiles.cc:405:5: warning: "YY_STACK_USED" is not defined
pofiles.cc: In member function `virtual int GettextBaseFlexLexer::yylex()':
pofiles.cc:523: error: `cin' undeclared (first use this function)
pofiles.cc:523: error: (Each undeclared identifier is reported only once for
   each function it appears in.)
pofiles.cc:526: error: `cout' undeclared (first use this function)
pofiles.cc: In member function `virtual void
   GettextBaseFlexLexer::LexerError(const char*)':
pofiles.cc:1367: error: `cerr' undeclared (first use this function)
pofiles.cc:1461:5: warning: "YY_MAIN" is not defined
make: *** [pofiles.lo] Error 1

I think this has to do with gcc 3.3 which is more strict than 2.95 in handling the std namespace: Adding std:: to cin, cout and cerr helped to solve the problem and now libgettext (and kbabel) compiles cleanly!
Comment 1 Stanislav Visnovsky 2004-03-04 18:06:59 UTC

*** This bug has been marked as a duplicate of 62895 ***