The Code
window.h
typedef struct
{
WNDCLASS* wc;
HWND hwnd;
WNDPROC proc;
} PRO_Window;
PRO_Window* PRO_WindowCreate(int width, int height, const char* title);
window.c
I don’t think this is important though…
PRO_Window* PRO_WindowCreate(int width, int height, const char* title) { /* code */ }
main.c
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR CmdLine, int nCmdShow)
{
PRO_Window* win = PRO_WindowCreate( 300, 300, "STATIC");
return 0;
}
The Error
GCC
main.o:main.c|| undefined reference to `PRO_WindowCreate(int, int, char const*)'|
* Reduced it to SSCCE
* I am using the windows api
The error with Boarland-C compiler seems to be because of the declaration of
wcafter thewnd->proc = NULL;. Try to move declaration above initialization statement…