c++.dos.32-bits - compile error
- "Jackson A. Marshall" <nospam nospam.org> Jan 14 2005
- "Walter" <newshound digitalmars.com> Jan 14 2005
- "Jackson A. Marshall" <nospam nospam.org> Jan 15 2005
- "Walter" <newshound digitalmars.com> Jan 20 2005
- Scott Michel <scottm aero.org> Jan 21 2005
- "Jackson A. Marshall" <nospam nospam.org> Jan 21 2005
- "Walter" <newshound digitalmars.com> Jan 21 2005
- "Jackson A. Marshall" <nospam nospam.org> Jan 17 2005
Development platform Win2k Pro SP4.
Have no problems with C++ console
programs.
Using files from www.dosextender.com :
CX.OBJ, X32.LIB, X32V.LIB, ZLX.LOD placed
in c:\dm\lib directory.
No problem with this program:
(runs in ms-dos 6.22 on another PC)
=======================
// hello.cpp
#include <stdio.h>
int main() {
puts("Hello\n");
return 0;
}
=======================
but with this:
---------------------------------
// hello2.cpp
#include <iostream>
using namespace std;
int main() {
cout << "Hello\n";
}
----------------------------------
IDDE output:
sc hello2.cpp -mx -o+space -5 -a4 -c -ohello2.obj
Error: c:\dm\stlport\stlport\cwchar(199): undefined identifier 'fgetwc'
Please help.
TIA
jam
Jan 14 2005
STL iostreams relies on wide character support. There is no wide character support in DOS extended programs, because DOS has no wide character support. "Jackson A. Marshall" <nospam nospam.org> wrote in message news:cs8h57$27ju$1 digitaldaemon.com...Development platform Win2k Pro SP4. Have no problems with C++ console programs. Using files from www.dosextender.com : CX.OBJ, X32.LIB, X32V.LIB, ZLX.LOD placed in c:\dm\lib directory. No problem with this program: (runs in ms-dos 6.22 on another PC) ======================= // hello.cpp #include <stdio.h> int main() { puts("Hello\n"); return 0; } ======================= but with this: --------------------------------- // hello2.cpp #include <iostream> using namespace std; int main() { cout << "Hello\n"; } ---------------------------------- IDDE output: sc hello2.cpp -mx -o+space -5 -a4 -c -ohello2.obj Error: c:\dm\stlport\stlport\cwchar(199): undefined identifier 'fgetwc' Please help. TIAjam
Jan 14 2005
"Walter" <newshound digitalmars.com> wrote in message news:cs94jn$2ud5$2 digitaldaemon.com..."Jackson A. Marshall" <nospam nospam.org> wrote in message news:cs8h57$27ju$1 digitaldaemon.com...
--------------------------------- // hello2.cpp #include <iostream> using namespace std; int main() { cout << "Hello\n"; } ---------------------------------- IDDE output: sc hello2.cpp -mx -o+space -5 -a4 -c -ohello2.obj Error: c:\dm\stlport\stlport\cwchar(199): undefined identifier 'fgetwc' Please help. TIAjam
STL iostreams relies on wide character support. There is no wide character support in DOS extended programs, because DOS has no wide character support.
There are other platforms described in the STL source e.g. AIX, which have no wide character support. #define _NOTHREADS #define _STLP_NO_NATIVE_WIDE_FUNCTIONS #include <iostream> using namespace std; int main() { cout << "Hello World!\n"; } IDDE output: sc hello3.cpp -mx -NL -NLx32.lib -5 -a4 -c hello3.obj link /NOI /DE /PACKF /XN hello3.LNK Warning: c:\dm\lib\stlp45dm_static.lib (1): Memory Model Conflict Error: c:\dm\lib\user32.lib (1231564): Not a Valid Library File Lines Processed: 16678 Errors: 1 Warnings: 1 Build failed Is there any way I can find what is contained within hello3.LNK? Perhaps you can explain why there is a 'memory model conflict' and why 'user32.lib' is even there for a DOSX application.
Jan 15 2005
"Jackson A. Marshall" <nospam nospam.org> wrote in message news:csc2od$3fu$1 digitaldaemon.com..."Walter" <newshound digitalmars.com> wrote in message
"Jackson A. Marshall" <nospam nospam.org> wrote in message news:cs8h57$27ju$1 digitaldaemon.com...
--------------------------------- // hello2.cpp #include <iostream> using namespace std; int main() { cout << "Hello\n"; } ---------------------------------- IDDE output: sc hello2.cpp -mx -o+space -5 -a4 -c -ohello2.obj Error: c:\dm\stlport\stlport\cwchar(199): undefined identifier
Please help. TIAjam
STL iostreams relies on wide character support. There is no wide
support in DOS extended programs, because DOS has no wide character
There are other platforms described in the STL source e.g. AIX, which have no wide character support. #define _NOTHREADS #define _STLP_NO_NATIVE_WIDE_FUNCTIONS #include <iostream> using namespace std; int main() { cout << "Hello World!\n"; } IDDE output: sc hello3.cpp -mx -NL -NLx32.lib -5 -a4 -c hello3.obj link /NOI /DE /PACKF /XN hello3.LNK Warning: c:\dm\lib\stlp45dm_static.lib (1): Memory Model Conflict Error: c:\dm\lib\user32.lib (1231564): Not a Valid Library File Lines Processed: 16678 Errors: 1 Warnings: 1 Build failed Is there any way I can find what is contained within hello3.LNK? Perhaps you can explain why there is a 'memory model conflict' and why 'user32.lib' is even there for a DOSX application.
Because stlp45dm_static.lib is compiled with the Win32 memory model. Trying to link this with -mx compiled .obj's will result in the "Memory Model Conflict" message. Embedded in the library is a directive to load the default libraries that support Win32, hence the attempt to link in user32.lib. If you wish to get this to work, I suggest looking at how to build the STL libraries (look in \dm\stlport), and try to get a build going for -mx.
Jan 20 2005
Walter wrote: > Because stlp45dm_static.lib is compiled with the Win32 memory model. Tryingto link this with -mx compiled .obj's will result in the "Memory Model Conflict" message. Embedded in the library is a directive to load the default libraries that support Win32, hence the attempt to link in user32.lib. If you wish to get this to work, I suggest looking at how to build the STL libraries (look in \dm\stlport), and try to get a build going for -mx.
The newer STLport 4.6 libraries are also available at http://mordred.cs.ucla.edu/STLport_DMC/. With a little tweaking of the smake makefile, you could compile it up for DOSX or a different platform altogether.
Jan 21 2005
"Scott Michel" <scottm aero.org> wrote in message news:csriok$jhb$2 digitaldaemon.com...Walter wrote: > Because stlp45dm_static.lib is compiled with the Win32 memory model. Tryingto link this with -mx compiled .obj's will result in the "Memory Model Conflict" message. Embedded in the library is a directive to load the default libraries that support Win32, hence the attempt to link in user32.lib. If you wish to get this to work, I suggest looking at how to build the STL libraries (look in \dm\stlport), and try to get a build going for -mx.
The newer STLport 4.6 libraries are also available at http://mordred.cs.ucla.edu/STLport_DMC/. With a little tweaking of the smake makefile, you could compile it up for DOSX or a different platform altogether.
Thank you both, Walter and Scott
Jan 21 2005
"Jackson A. Marshall" <nospam nospam.org> wrote in message news:csrnjm$qci$1 digitaldaemon.com...Thank you both, Walter and Scott
You're welcome. If you do get STL to work with DOSX, please post here some instructions so that others can stand on your shoulders!
Jan 21 2005
"Walter" <newshound digitalmars.com> wrote in message news:cs94jn$2ud5$2 digitaldaemon.com...STL iostreams relies on wide character support. There is no wide character support in DOS extended programs, because DOS has no wide character support.
Just found this on c++.stl.port in which you say it can be used for Dos ... "Walter" <walter digitalmars.com> wrote in message news:bcgb1t$1b52$1 digitaldaemon.com..."Wichetael" <wichetael gmx.net> wrote in message news:bc9pk4$1adj$1 digitaldaemon.com...In article <bc823c$2rcc$1 digitaldaemon.com>, Walter says..."Wichetael" <wichetael gmx.net> wrote in message news:bc5mav$mc3$1 digitaldaemon.com...Would is it be possible with a reasonable ammount of effort to compile the iostreams STLport library as a static library for a DOS 16 bit platform? Any ideas on how much of an effort this would take to do?
I think it is not worth while since it would wind up too large for the 16 bit memory space.
Even when using a large memory model? Is the iostreams library that large?
You can try it if you want. I know of no particular reason why it wouldn't work, but I have not tried it.
Jan 17 2005









"Walter" <newshound digitalmars.com> 