Page 1 of 1

InpOut32.h has syntax errrors

Posted: Tue Mar 24, 2009 6:21 pm
by rchan
Hi there,
firstly thanks Phil for the driver. Been trying to get TTL pulse going from the parallel port of XP 64 bit box for the last week or so. With your software it now DONE!

Problem is I had to comment out all the functions in the header file except Inp32 and Out32 because of the errors. Any clues why? I'm running a Dell Precision T5400 with XP 64 Professional. Code was linked with both Visual C++ Express 2008 and Mathlab 2008b with similar errors.

Cheers,
Raymond

Re: InpOut32.h has syntax errrors

Posted: Tue Mar 24, 2009 9:59 pm
by phil
Urr, it might help if you actually told me what syntax errors you are seeing!
Without that information it is completely impossible to tell!

Paste the compiler output/log here and maybe all will become clear. :)

Thanks,
Phil

Re: InpOut32.h has syntax errrors

Posted: Thu Mar 26, 2009 4:08 pm
by rchan
Hi,
that was incredibly silly of me. Here is the Visual C++ compilation error

1>------ Build started: Project: InpOut32, Configuration: Debug Win32 ------
1>Compiling...
1>test1.c
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(10) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(11) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(14) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(14) : error C2146: syntax error : missing ')' before identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(14) : error C2061: syntax error : identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(14) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(14) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(15) : error C2146: syntax error : missing ')' before identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(15) : error C2061: syntax error : identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(15) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(15) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(15) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(17) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(17) : error C2146: syntax error : missing ')' before identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(17) : error C2061: syntax error : identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(17) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(17) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(18) : error C2146: syntax error : missing ')' before identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(18) : error C2061: syntax error : identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(18) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(18) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(18) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(20) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(20) : error C2146: syntax error : missing ')' before identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(20) : error C2061: syntax error : identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(20) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(20) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(21) : error C2146: syntax error : missing ')' before identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(21) : error C2061: syntax error : identifier 'port'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(21) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(21) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(21) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(24) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(24) : error C2146: syntax error : missing ')' before identifier 'pbPhysAddr'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(24) : error C2061: syntax error : identifier 'pbPhysAddr'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(24) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(24) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(24) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(25) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(25) : error C2146: syntax error : missing ')' before identifier 'PhysicalMemoryHandle'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(25) : error C2061: syntax error : identifier 'PhysicalMemoryHandle'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(25) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(25) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(25) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(26) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(26) : error C2146: syntax error : missing ')' before identifier 'pbPhysAddr'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(26) : error C2061: syntax error : identifier 'pbPhysAddr'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(26) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(26) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(26) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(27) : error C2143: syntax error : missing '{' before '__stdcall'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(27) : error C2146: syntax error : missing ')' before identifier 'pbPhysAddr'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(27) : error C2061: syntax error : identifier 'pbPhysAddr'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(27) : error C2059: syntax error : ';'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(27) : error C2059: syntax error : ','
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\inpout32.h(27) : error C2059: syntax error : ')'
1>c:\documents and settings\rchan\my documents\visual studio 2008\projects\inpout32\inpout32\test1.c(5) : warning C4020: 'Inp32' : too many actual parameters
1>Build log was saved at "file://c:\Documents and Settings\rchan\My Documents\Visual Studio 2008\Projects\InpOut32\InpOut32\Debug\BuildLog.htm"
1>InpOut32 - 56 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The mathlab less of the of them but they intersect with the C++ ones.

Re: InpOut32.h has syntax errrors

Posted: Thu Mar 26, 2009 10:33 pm
by phil
I'm guessing that for some reason your don't have definitions for
BOOL, UCHAR, USHORT, ULONG, PBYTE and bool

I thought these are C++ types so I don't know why your environment would not have those defined - maybe its more MS specific than I thought or maybe your missing an include somewhere.

Either way it is safe to remove everything after the comment line
//My extra functions for making life easy

Unless you really want to call one of my "make life easy" functions, in which case you will have to include the relevant file that defines those types

Does that make sense?

Thanks,
Phil

Re: InpOut32.h has syntax errrors

Posted: Fri Mar 27, 2009 3:55 am
by rchan
Yup thought as much.

Did a quick google and am pretty sure thats they are not from standard (ansi ?) C++ libraries. Any idea where and what the missing header file could be? Just guess a starting point would be nice! I'm really unused to this MS thing without /src/headers/ and such.