User forums > Help

Problem compiling with DM/STLport

(1/2) > >>

Priit:

--- Code: ---#include <iostream>

using namespace std;

int main (int argc, char *argv[])
{
cout << "Hello World!" << endl;
cout << "Press ENTER to continue..." << endl;
cin.get();
return 0;
}
--- End code ---

It won't compile, when used Digitalmars compiler (v843) with Codeblocks, but it will compile when used dm in command line.

Error i get:

--- Code: ---Project   : Console application
Compiler  : Digital Mars Compiler (called directly)
Directory : C:\Documents and Settings\Priit\Desktop\
--------------------------------------------------------------------------------
Switching to target: default
dmc.exe -mn -c       -I"C:\dm\include" -o.objs\main.obj mrain.cpp
C:\dm\bin\..\stlport\stlport\stl/_alloc.h(134) : Error: undefined identifier '__stl_new'
C:\dm\bin\..\stlport\stlport\stl/_alloc.h(135) : Error: undefined identifier '__stl_delete'
class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE {
                                                                           ^
C:\dm\bin\..\stlport\stlport\stdexcept(56) : Error: identifier expected
--- errorlevel 1
Process terminated with status 1 (0 minutes, 1 seconds)
3 errors, 0 warnings
 

--- End code ---

tiwag:
edit your sc.ini so that it contains the pathes to your stlport includes and libs directories.

Priit:

--- Quote from: tiwag on August 01, 2005, 11:02:55 am ---edit your sc.ini so that it contains the pathes to your stlport includes and libs directories.

--- End quote ---

I think i allready did that. Anyway here's my sc.ini:


--- Code: ---[Version]
version=7.51 Build 020

[Environment]
PATH=%PATH%;"%@P%\..\bin"
BIN="%@P%\..\bin"
INCLUDE="%@P%\..\stlport\stlport";"%@P%\..\include";"%@P%\..\mfc\include";%INCLUDE%
LIB="%@P%\..\lib";"%@P%\..\mfc\lib";%LIB%
HELP="%@P%\..\help"


--- End code ---


Sorry for posting into wrong thread at the first place :)

mandrav:
I haven't worked with DM much, but are you sure it's using sc.ini when invoked by C::B?
If I were you, I would add the above directories in the global directories option for the DM compiler...

Yiannis.

Priit:
I added C:\dm\stlport\stlport directory to DM compiler global directories (Compile-Compiler Options-Digital Mars Compiler-Directories-Compiler) and it works, but C:\dm\stlport\stlport has to be before  \dm\include. Otherwise i get the same error mentioned above.

Thank you

Navigation

[0] Message Index

[#] Next page

Go to full version