Thread: problems inpout32 and vc++ express 2005

  1. #1
    Registered User
    Join Date
    May 2010

    problems inpout32 and vc++ express 2005

    ------ Build started: Project: io, Configuration: Debug Win32 ------
    k:\program files\io\io\io\Form1.h(320) : warning C4441: calling convention of '__stdcall ' ignored; '__clrcall ' used instead
    k:\program files\io\io\io\Form1.h(321) : warning C4441: calling convention of '__stdcall ' ignored; '__clrcall ' used instead
    io.obj : error LNK2020: unresolved token (06000004) io.Form1::Inp32
    io.obj : error LNK2020: unresolved token (06000005) io.Form1::Out32
    K:\Program files\io\io\Debug\io.exe : fatal error LNK1120: 2 unresolved externals
    Build log was saved at "file://k:\Program files\io\io\io\Debug\BuildLog.htm"
    io - 3 error(s), 2 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    The problems:
    1. I can not get inpout32 to work.
    2. I learned all I know from c++ for dummies and the VC++ help file. And I didn't say I learned it well..(I am going through the tutorials here as of today)

    What I have to work with:
    1. Visual C++ 2005 express edition. Not Visual studio - perhaps this is part of the problem?
    2. Windows XP Professional Version 2002 Service pack 3.
    3. A borrowed computer with an internet connection. (above xp computer has no internet)
    4. unmedicated self taught programmer
    5. abundant but limited supply of caffeine.

    What I want to do:
    I want to test the port LPT1 like this,
    test all pins
    	display the results.
    	save the results.
    zero all outputs
    retest inputs
    	compare result to saved results
    	test input
    		make decisions based on result
    		send output to individual pins
    	break loop
    free up everything
    drink something good
    return (to bed)

    so, I started a windows forms project named io.

    In the
    project properties,
    additional Dependencies
    I added inpout.lib

    I have included:
    #include "stdafx.h"
    #include "stdio.h"
    #include "string.h"
    #include "stdlib.h"
    #include "Form1.h"
    using namespace io;
    using namespace std;
    in the main io.cpp file.

    and here are my protos:
    	short _stdcall Inp32(short PortAddress);
    	void _stdcall Out32(short PortAddress, short data);
    and here is the first tiny bit of code that I puyt in just befor the errors started:
    	int reg;
    Last edited by on_the_alm; 05-07-2010 at 09:41 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed