problems inpout32 and vc++ express 2005

This is a discussion on problems inpout32 and vc++ express 2005 within the Windows Programming forums, part of the Platform Specific Boards category; Errors: Code: ------ Build started: Project: io, Configuration: Debug Win32 ------ Compiling... io.cpp k:\program files\io\io\io\Form1.h(320) : warning C4441: calling convention ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    6

    problems inpout32 and vc++ express 2005

    Errors:
    Code:
    ------ Build started: Project: io, Configuration: Debug Win32 ------
    Compiling...
    io.cpp
    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
    Linking...
    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,
    Code:
    test all pins
    	display the results.
    	save the results.
    zero all outputs
    retest inputs
    	compare result to saved results
    loop
    	test input
    		make decisions based on result
    		send output to individual pins
    	break loop
    free up everything
    exit
    
    drink something good
    return (to bed)
    *********

    so, I started a windows forms project named io.

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

    I have included:
    Code:
    #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:
    Code:
    	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:
    Code:
    	int reg;
    	reg=Inp32(378);
    Last edited by on_the_alm; 05-07-2010 at 10:41 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21