I'm having troubles with the missing prototype warning. I have the function:
int GetNext()
{
int n = GetTickCount();
n=n%3;
n++;
return n;
}
with the prototype:
int GetNext();
But it still gives me the warning. Is there something I'm missing?
You should have
int GetNext(void)
{
code
}
John
that gave me an error.
error #2120: Redeclaration of 'GetNext' previously declared
found 'int __stdcall function(void)' expected 'int __cdecl function'.
*** Error code: 1 ***
Do you have the prototype anywhere else, for example in a header?
John
hi all
I have the problem with the same warning.
Project is developing for PockePC and when I want to include some usefull functions from MS Platform Builder (file "Pkfuncs.h") it's write me that warning (and others like warning #2099: Missing type specifier) and a many errors.
How can I resolve it?
P.S. Does anybody know how reboot the PocketPC from application? (i try to do it by KernelIoControl function, but can't build the project 'cause has a subject warning)
Prototypes and functions should match
int SomeFunc(void);
int SomeFunc(void)
{
code
}
I don't have Pkfuncs.h so can't comment.
John
typedef struct _CALLBACKINFO {
HANDLE hProc; /* destination process */
FARPROC pfn; /* function to call in dest. process */
PVOID pvArg0; /* arg0 data */
} CALLBACKINFO;
typedef CALLBACKINFO *PCALLBACKINFO;
there is a warning about missing prototype.
May be the "C" syntax doesn't support it construction? Or something else?
And another:
warning #2099: Missing type specifier.
BOOL CeSetExtendedPdata(LPVOID pData);
BOOL and LPVOID defined in windef.h
And there are many analog warnings.
P.S. This is Pkfuncs.h file)
Quote from: sp00n on April 18, 2007, 03:03:33 PM
typedef struct _CALLBACKINFO {
HANDLE hProc; /* destination process */
FARPROC pfn; /* function to call in dest. process */
PVOID pvArg0; /* arg0 data */
} CALLBACKINFO;
typedef CALLBACKINFO *PCALLBACKINFO;
there is a warning about missing prototype.
May be the "C" syntax doesn't support it construction? Or something else?
It just compiled here with no problems.
Quote
And another:
warning #2099: Missing type specifier.
BOOL CeSetExtendedPdata(LPVOID pData);
BOOL and LPVOID defined in windef.h
What are your includes ? E.G. #include <windows.h>
John
I've added in the pkfucs.h including windows.h but it doesn't make any effect :(
in my main project are following includes:#include <windows.h>
#include <windowsx.h>
#include <aygshell.h>
#include "main.h" //my header for the project
#include <windef.h> //i've included after that when saw the troubles(
#include <Pkfuncs.h>
command line for compiler:
-Tarm-coff -W2 -Gz -Ze -D_WINCE -DUNICODE
all include folders i've added normally to the project properties with full existing paths:)
windef.h is already included by including windows.h
I suggest you post an attachment of a small project that shows the problem, someone that uses WINCE will be able to help.
John
hm, just in my project I wanna use a KernelIoControl function, that defined in Pkfuncs.h
In MS VC++ 8.0 all works well, but in Pelles C I have this problem:(
As a project is a small tool, so I wanna use Pelles C - exe-file has a 15Kb size:), in MS VC - 600Kb
Ok, in anyway thanks for your answers, John.