Thread overview | |||||
---|---|---|---|---|---|
|
February 16, 2004 Can't compile hello.cpp | ||||
---|---|---|---|---|
| ||||
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. |
February 20, 2004 Re: Can't compile hello.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexis | 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. |
February 21, 2004 Re: Can't compile hello.cpp | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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.
>
>
>
|
Copyright © 1999-2021 by the D Language Foundation