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);