At 11:48 2002-11-19 +0200, you wrote:
Hi,
    I am using CodeWarrior 8.0 and want to use STL in my project. I included
the MSL Standard C/C++ Library and added the line #include <string>. However
the compiler issues the following error in the file iosfwd:


Error: declaration syntax error
iosfwd    line 42    namespace std{

The code in the file iosfwd is:
#ifndef _MSL_NO_CPP_NAMESPACE
 namespace std {
#endif

Waht should I do?
Are you including this file from a .c file or a .cpp file? It looks like you're trying to include standard C++ headers from a C file, something that won't work. You can either rename your source files to .cpp, or turn on the "Activate C++ Compiler" switch in the C/C++ Language panel, which will tell CodeWarrior to compile your .c files using C++.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to