Visual C++ 1.52 error
-
I'm trying ot compile a function that I developed and successfully compiled in Visual c++ 5.0 as well as on Unix. I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program. I get the error: error C2065: 'MAKEWORD' : undeclared identifier on the following code: #ifdef WIN WORD wVersionRequested; int err; // Stuff for WSA functions WSADATA wsaData; // Stuff for WSA functions wVersionRequested=MAKEWORD(1,1); #endif I have the following includes: #ifdef WIN #include // Needed for printf() #include // Needed for memcpy() and strcpy() #include #include #include #endif Any idea why I get this error on code that compiled on other platforms ?
-
I'm trying ot compile a function that I developed and successfully compiled in Visual c++ 5.0 as well as on Unix. I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program. I get the error: error C2065: 'MAKEWORD' : undeclared identifier on the following code: #ifdef WIN WORD wVersionRequested; int err; // Stuff for WSA functions WSADATA wsaData; // Stuff for WSA functions wVersionRequested=MAKEWORD(1,1); #endif I have the following includes: #ifdef WIN #include // Needed for printf() #include // Needed for memcpy() and strcpy() #include #include #include #endif Any idea why I get this error on code that compiled on other platforms ?
#include Windef.h #include Windows.h
jnhemley wrote:
I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program.
I would like to shake your hand. No, really. /ravi
This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
I'm trying ot compile a function that I developed and successfully compiled in Visual c++ 5.0 as well as on Unix. I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program. I get the error: error C2065: 'MAKEWORD' : undeclared identifier on the following code: #ifdef WIN WORD wVersionRequested; int err; // Stuff for WSA functions WSADATA wsaData; // Stuff for WSA functions wVersionRequested=MAKEWORD(1,1); #endif I have the following includes: #ifdef WIN #include // Needed for printf() #include // Needed for memcpy() and strcpy() #include #include #include #endif Any idea why I get this error on code that compiled on other platforms ?
-
#include Windef.h #include Windows.h
jnhemley wrote:
I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program.
I would like to shake your hand. No, really. /ravi
This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com
-
I'm trying ot compile a function that I developed and successfully compiled in Visual c++ 5.0 as well as on Unix. I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program. I get the error: error C2065: 'MAKEWORD' : undeclared identifier on the following code: #ifdef WIN WORD wVersionRequested; int err; // Stuff for WSA functions WSADATA wsaData; // Stuff for WSA functions wVersionRequested=MAKEWORD(1,1); #endif I have the following includes: #ifdef WIN #include // Needed for printf() #include // Needed for memcpy() and strcpy() #include #include #include #endif Any idea why I get this error on code that compiled on other platforms ?
Have you tried the obvious? search for MAKEWORD in Visual C++ 5.0 documentation? It states it is in windef.h So if it aint in 1.52 windef.h just add it into some header file e.g. from Visual C++ 5.0 windef.h #define MAKEWORD(a, b) ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
-
Have you tried the obvious? search for MAKEWORD in Visual C++ 5.0 documentation? It states it is in windef.h So if it aint in 1.52 windef.h just add it into some header file e.g. from Visual C++ 5.0 windef.h #define MAKEWORD(a, b) ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
-
I'm trying ot compile a function that I developed and successfully compiled in Visual c++ 5.0 as well as on Unix. I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program. I get the error: error C2065: 'MAKEWORD' : undeclared identifier on the following code: #ifdef WIN WORD wVersionRequested; int err; // Stuff for WSA functions WSADATA wsaData; // Stuff for WSA functions wVersionRequested=MAKEWORD(1,1); #endif I have the following includes: #ifdef WIN #include // Needed for printf() #include // Needed for memcpy() and strcpy() #include #include #include #endif Any idea why I get this error on code that compiled on other platforms ?
jnhemley wrote:
I'm trying ot compile a function that I developed and successfully compiled in Visual c++ 5.0 as well as on Unix. I need to compile it in a 16 bit DOS environment using sockets to interface it with an old Cobol program.
A bit off topic, but if you are using sockets, then why do you need to write 16 bit code? Sockets is just a stream of bytes, and the recipient Cobol code won't know or care that it was sent the stream from a 16 bit process or a 32 bit process, and your easier-to-write 32 bit code won't care how the reply stream was generated. Mike