Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Visual C++ 1.52 error

Visual C++ 1.52 error

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionworkspace
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jnhemley
    wrote on last edited by
    #1

    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 ?

    R J T M 4 Replies Last reply
    0
    • J jnhemley

      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 ?

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      #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

      J 1 Reply Last reply
      0
      • J jnhemley

        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 ?

        J Offline
        J Offline
        jnhemley
        wrote on last edited by
        #3

        The includes are the following: include stdio.h include string.h include windows.h include winsock.h include stdlib.h I stripped out some of the characters because they didn't print on the forum for my previous message.

        1 Reply Last reply
        0
        • R Ravi Bhavnani

          #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

          J Offline
          J Offline
          jnhemley
          wrote on last edited by
          #4

          Believe me, I didn't know what I was getting myself into when I started this.

          1 Reply Last reply
          0
          • J jnhemley

            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 ?

            T Offline
            T Offline
            Ted Ferenc
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • T Ted Ferenc

              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

              J Offline
              J Offline
              jnhemley
              wrote on last edited by
              #6

              Thanks. The obvious works !

              1 Reply Last reply
              0
              • J jnhemley

                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 ?

                M Offline
                M Offline
                Mike ONeill
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups