| |
| Posted by Daniel Jomphe | PermalinkReply |
|
Daniel Jomphe
| Hi,
I thank you for your previous answers to my questions. I am now up to the point of making tests to decide how I will port my Win32 app to DOS using DMC.
In the course of my tests, I wanted to see if an app using STL and compiled for DOS with DMC, using DosX services, would be possible. Unfortunately, I ran on linker errors. I'm using OPTLINK by default, as suggested in DM's documentation.
I compile and link with these settings :
DMC myApp
-Ic:\dev\dm\stlport\stlport c:\dev\dm\lib\stlport_dm_static.lib
-mx X32.lib
Here's the code :
#include <iostream>
int main(int argc, char* argv[])
{
std::cout << "hello world";
return 0;
}
It compiles properly, and OPTLINK reports about 30 errors and an 'errorLevel 40'. I give you a sample of them:
the first one:
c:\dev\dm\lib\stlport_dm_static.lib Offset 052ACH Record Type 0088
Warning 169: Memory Model Conflict
the next ones, all about decorated names:
c:\dev\dm\lib\stlport_dm_static.lib(fstream)
Error 42: Symbol Undefined _CloseHandle@4
c:\dev\dm\lib\stlport_dm_static.lib(c_locale)
Error 42: Symbol Undefined _WideCharToMultiByte@32
C:\Dev\dm\bin\..\lib\SNN.lib(except)
Error 42: Symbol Undefined _SetUnhandledExceptionFilter@4
I also tried not using <iostream> but using <stdio.h>'s printf(...)s but including <list> and instanciating a <list> of chars this way,
std::list<char> c;
to see if <iostream> must not be used in DOS. Again, it compiles and OPTLINK reports many errors (with 'errorLevel 14' this time), starting with the same one about a Memory Model Conflict. There's also some
C:\Dev\dm\bin\..\lib\SNN.lib(except)
Error 42: Symbol Undefined _SetUnhandledExceptionFilter@4
In regard of all these considerations, I'd like to know if it is possible to compile, link and run for DOS an application using STL with DMC (or any other compiler, but I doubt any other would do it). If so, what could I do to make my examples work?
Thank you,
Daniel Jomphe
|