Thread overview
stopping inclusion of windows' libs
Dec 24, 2004
Alan
Dec 26, 2004
Alan
Dec 31, 2004
Anuj Goyal
December 24, 2004
c:\dm\bin\dmc union1.cpp -Ic:\dm\stlport\stlport c:\dm\lib\stlp45dm_static.lib link union1,,,c:\dm\lib\stlp45dm_static+user32+kernel32/noi;

I don't want user32 and kernel32 linked in for this Dos-Box program (system:
Win2k Pro SP4)

#include <iostream>
using namespace std;

typedef unsigned char byte;
typedef unsigned long int32;

union converter {
 byte  b[4];
 int32 i;
};

int main() {

   converter c;

   c.b[3] = (byte) 0x12;
   c.b[2] = (byte) 0x34;
   c.b[1] = (byte) 0x56;
   c.b[0] = (byte) 0x78;

   int32 r = c.i;
   cout << "r = " << hex << r << endl;
}

// results
// r = 0x12345678



December 26, 2004
"Alan" <alan@surfbest.net> wrote in message news:cqhb2l$314f$1@digitaldaemon.com...
> c:\dm\bin\dmc union1.cpp -Ic:\dm\stlport\stlport c:\dm\lib\stlp45dm_static.lib link union1,,,c:\dm\lib\stlp45dm_static+user32+kernel32/noi;
>
> I don't want user32 and kernel32 linked in for this Dos-Box program (system:
> Win2k Pro SP4)
[snip]

Problem solved.



December 31, 2004
how?

>"Alan" <alan@surfbest.net> wrote in message news:cqhb2l$314f$1@digitaldaemon.com...
>> c:\dm\bin\dmc union1.cpp -Ic:\dm\stlport\stlport c:\dm\lib\stlp45dm_static.lib link union1,,,c:\dm\lib\stlp45dm_static+user32+kernel32/noi;
>>
>> I don't want user32 and kernel32 linked in for this Dos-Box program (system:
>> Win2k Pro SP4)
>[snip]
>
>Problem solved.