: : It could be that the compiler encouters the calls to the functions before it encounters the prototypes. That's why it is more elegant to have the prototypes in separate header files and #include them in all sources that contains calls to the functions.
: : If that is not the case, pls post some more code.
: :
: :
: : Greets,
: : Eric Goldstein
: : www.gvh-maatwerk.nl
: :
:
I could only have both the prototypes and functions a very little bit closer to the front than they are now. In fact, I usually build my functions right after the protoypes right after all the variables are defined, as you'll see below. I'm probably supposed to have them somewhere else for win32, or perhaps I need to build a class or something?
:
: There is only one source file (.c) with several #includes (.h). None of the includes has any function calls. They are large array initializers and combobox fillers. Almost all of the program runs 100% on two different machines.
:
: Here's a stripped down version of the source:
:
: #include <windows.h>
: #include "BECommnd.h" // resource file
:
: const char g_szClassName[] = "myWindowClass";
: HWND hwnd, ...;
:
: char ExtKey, FKey = 'F', EKey = 'E';
: UINT Timer1, Timer2;
: int TType = 5, Timer, position = 0,
: MIN_POSITION = 0, MAX_POSITION = 0;
: DWORD PBIndex;
: char Position[100][65];
: char PositionTemp[65];
: char Command[500];
:
: #include "CmdBox.h"
: ... // these initialize large arrays
: #include "phlength.h"
:
: void CheckButtons();
: void NextCommand();
: void UpdateWin();
: void swapWin(HWND window);
: void InitPosBox();
: void cancelCommand();
: void handleTimer1();
:
: void handleTimer1() // each of the following call back and forth
: { // with warnings proclaimed
: ...
: }
:
: void cancelCommand()
: {
: ...
: }
:
: void InitPosBox()
: {
: ...
: }
:
: void swapWin(HWND window)
: {
: ...
: }
:
: void UpdateWin()
: {
: ...
: }
:
: void NextCommand()
: {
: ...
: }
:
: void checkButtons()
: {
: ...
: }
:
: BOOL CALLBACK AboutDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
: {
: ...
: }
:
: LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
: {
: ... // calls from here to all above functions give warnings
: // except for the call to AboutDlgProc
: }
:
: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
: LPSTR lpCmdLine, int nCmdShow)
: {
: ...
: }
:
:
: Thanks for helping me through these learning experiences...
:
: Take Care,
: Ed
:
:
:
Aha. Got it. Look at the spelling of your checkButtons function and prototype....
Greets,
Eric Goldstein
www.gvh-maatwerk.nl