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. "using system" generates "undeclared" error. _outp also.

"using system" generates "undeclared" error. _outp also.

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
5 Posts 3 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.
  • R Offline
    R Offline
    RealHigh
    wrote on last edited by
    #1

    Hello, I´m trying to output a byte to parallel printer port using dev-c++. I´ve included dos.h and conio.h, and I´ve put inpout32.dll in the system32 dll folder, but when I try to compile, the compiler stops at the "using system" instruction. I`m not very experienced with C programming and am feeling my way around, as yet.What I´m trying to do is to send a signal which can be read by a PLC which will in turn open an automatic barrier to let a registered vehicle in. Can anybody help me out? Many anticipated thanks Andrew

    G D 2 Replies Last reply
    0
    • R RealHigh

      Hello, I´m trying to output a byte to parallel printer port using dev-c++. I´ve included dos.h and conio.h, and I´ve put inpout32.dll in the system32 dll folder, but when I try to compile, the compiler stops at the "using system" instruction. I`m not very experienced with C programming and am feeling my way around, as yet.What I´m trying to do is to send a signal which can be read by a PLC which will in turn open an automatic barrier to let a registered vehicle in. Can anybody help me out? Many anticipated thanks Andrew

      G Offline
      G Offline
      Goto_Label_
      wrote on last edited by
      #2

      After the #include <...> lines, insert the following:

      short _stdcall Inp32(short PortAddress); */
      void _stdcall Out32(short PortAddress, short data);

      and link with inpout32.dll Sample code:

      #include
      #include
      #include
      short _stdcall Inp32(short PortAddress); */
      void _stdcall Out32(short PortAddress, short data);

      //link with inpout32.dll

      using namespace std;

      int main()
      {
      cout<<"Parallel Port Interfacing"<

      R 1 Reply Last reply
      0
      • R RealHigh

        Hello, I´m trying to output a byte to parallel printer port using dev-c++. I´ve included dos.h and conio.h, and I´ve put inpout32.dll in the system32 dll folder, but when I try to compile, the compiler stops at the "using system" instruction. I`m not very experienced with C programming and am feeling my way around, as yet.What I´m trying to do is to send a signal which can be read by a PLC which will in turn open an automatic barrier to let a registered vehicle in. Can anybody help me out? Many anticipated thanks Andrew

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        RealHigh wrote:

        but when I try to compile, the compiler stops at the "using system" instruction.

        Care to share the exact error message as well as the offending statement?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

        R 1 Reply Last reply
        0
        • G Goto_Label_

          After the #include <...> lines, insert the following:

          short _stdcall Inp32(short PortAddress); */
          void _stdcall Out32(short PortAddress, short data);

          and link with inpout32.dll Sample code:

          #include
          #include
          #include
          short _stdcall Inp32(short PortAddress); */
          void _stdcall Out32(short PortAddress, short data);

          //link with inpout32.dll

          using namespace std;

          int main()
          {
          cout<<"Parallel Port Interfacing"<

          R Offline
          R Offline
          RealHigh
          wrote on last edited by
          #4

          Thanks for kindly answering. Using your sugestion solved the problem. Thanks again, Kindest regards

          1 Reply Last reply
          0
          • D David Crow

            RealHigh wrote:

            but when I try to compile, the compiler stops at the "using system" instruction.

            Care to share the exact error message as well as the offending statement?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

            R Offline
            R Offline
            RealHigh
            wrote on last edited by
            #5

            Hi David, Thanks a lot. Yes I threw out the code I was trying compile, and just started anew, using suggestion from just-in-time. I still don´t know if the code actually works, but at least it´s compiled ok. Kindest regards

            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