Menu

Parallel Port I/O etc

Tim Coker
2003-09-03
2012-09-26
  • Tim Coker

    Tim Coker - 2003-09-03

    I'm trying to use the _outp functions that are part of MSVCRT, but the linker gives me a "undefined reference message" and thats only if I put a function prototype in, otherwise the compiler just tells me it doesnt recognise the function at all.

    The MS site indicates you need to include <conio.h> and I know there are issues with this. I've tried the workaround (ie including conio.c etc) with no luck, and anyway _outp isnt declared in conio.h...

    More strangely (to me anyway), in a very similar file compiled as a DLL, there doenst seem to be a problem... (havent used the dll yet though)

    I'm confused, but then I'm not an expert (on this sort of thing)

    Thanks

    Tim

     
    • Wayne Keen

      Wayne Keen - 2003-09-04

      Do a forum search in the bloodshed forum (this is really not a support forum, it is a developer forum), this topic has been discussed before.

      Search is started by little box in the upper left, button labled "search"...be patient, it takes time..

      Wayne

       
    • Tim Coker

      Tim Coker - 2003-09-05

      Well thanks for the sarcasm, do you think I didnt try searching before I posted a message...?

      Anyway, the question was about why it seemed to work when compiling a DLL rather than an exe, not just how to type "_outp(" into the code (I'd got that far myself). The *answer* seems to be related to whether or not the project is C or C++. Initially I was unable to replicate the problem, the only way I managed to was by changing the 'compile as C++' options in the Project Options dialogue...

      I can only think that my DLL project was correctly set up as a C project, whereas the exe one I'd set up as a C++ project unintentionally.

      So if anyone else has this problem, then thats your first place to look...

      Tim

       
    • Wayne Keen

      Wayne Keen - 2003-09-05

      No sarcasm was intended Tim.  The reason Igave directions to the search box is that a large number of folks that I give such directions indicate soemthing along the lines of "I didn't know that was there!"

      "do you think I didnt try searching before I posted a message...?"

      How would I know? You gave no indication that you had.  Most folks don't.

      I'm glad you found you answer and documented it...

      Wayne

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.