c++.stl.port - Can't compile hello.cpp
- Alexis (23/23) Feb 15 2004 Hello,
- Walter (17/40) Feb 19 2004 This works:
- Phil Thompson (6/68) Feb 21 2004 I got this same error when including STL Port in sc.ini. The include
Hello, I finally succeeded compiling stlport (I couldn't because I was using the Platform SDK includes), but this is what I get when I try to compile the included hello.cpp: sc hello.cpp -mn -C -WA -S -3 -a8 -c -gf -ohello.obj Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stl/_alloc.h(134): undefined identifier '__stl_new' Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stl/_alloc.h(135): undefined identifier '__stl_delete' Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stdexcept(56): identifier expected Lines Processed: 15872 Errors: 3 Warnings: 0 Build failed hello.cpp just has: #include <iostream> using namespace std; int main() { cout << "Hello world\n"; } Thanks in advance for your help. Alexis. PS: Yes, I'm still an STL newbie! Please have patience with me.
Feb 15 2004
This works: ------------------------------------------ C:\cbx>type test.cpp #include <iostream> using namespace std; int main() { cout << "Hello world\n"; } C:\cbx>sc test -I\dm\stlport\stlport link test,,,user32+kernel32/noi; C:\cbx>test Hello world C:\cbx> ------------------------------------------ "Alexis" <alexis_golzman yahoo.com.ar> wrote in message news:Xns9490E370911EAagolzman 63.105.9.61...Hello, I finally succeeded compiling stlport (I couldn't because I was using the Platform SDK includes), but this is what I get when I try to compile the included hello.cpp: sc hello.cpp -mn -C -WA -S -3 -a8 -c -gf -ohello.obj Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stl/_alloc.h(134): undefined identifier '__stl_new' Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stl/_alloc.h(135): undefined identifier '__stl_delete' Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stdexcept(56): identifier expected Lines Processed: 15872 Errors: 3 Warnings: 0 Build failed hello.cpp just has: #include <iostream> using namespace std; int main() { cout << "Hello world\n"; } Thanks in advance for your help. Alexis. PS: Yes, I'm still an STL newbie! Please have patience with me.
Feb 19 2004
I got this same error when including STL Port in sc.ini. The include needs to go before the other includes. I imagine this has the same effect as adding the -I\dm\stlport\stlport include to the commandline. Regards, Phil Walter wrote:This works: ------------------------------------------ C:\cbx>type test.cpp #include <iostream> using namespace std; int main() { cout << "Hello world\n"; } C:\cbx>sc test -I\dm\stlport\stlport link test,,,user32+kernel32/noi; C:\cbx>test Hello world C:\cbx> ------------------------------------------ "Alexis" <alexis_golzman yahoo.com.ar> wrote in message news:Xns9490E370911EAagolzman 63.105.9.61...Hello, I finally succeeded compiling stlport (I couldn't because I was using the Platform SDK includes), but this is what I get when I try to compile the included hello.cpp: sc hello.cpp -mn -C -WA -S -3 -a8 -c -gf -ohello.obj Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stl/_alloc.h(134): undefined identifier '__stl_new' Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stl/_alloc.h(135): undefined identifier '__stl_delete' Error: C:\PROGTOOLS\DM\BIN\..\stlport\stlport\stdexcept(56): identifier expected Lines Processed: 15872 Errors: 3 Warnings: 0 Build failed hello.cpp just has: #include <iostream> using namespace std; int main() { cout << "Hello world\n"; } Thanks in advance for your help. Alexis. PS: Yes, I'm still an STL newbie! Please have patience with me.
Feb 21 2004