So i am following this(
http://www.winprog.org/tutorial/app_two.html) tutorial as a beginner to windows programming, and so far i have been able to solve every problem iv come across, that is until i got to this one. when i call GetOpenFileName(insertmypointerhere) i get the error "193|undefined reference to `GetOpenFileNameA@4'|", i have included <windows.h>. Also as if that is not strange enough it only happens in debug not release.
I am using Codeblocks as my ide and gnu gcc compiler.
i have windows 7.
heres the function that GetOpenFileName is called in:
"
void DoFileOpen(HWND hwnd)
{
OPENFILENAME ofn;
char szFileName[MAX_PATH] = "";
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hwnd;
ofn.lpstrFilter = "Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
ofn.lpstrFile = szFileName;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = "txt";
if(GetOpenFileName(&ofn))
{
HWND hEdit = GetDlgItem(hwnd, IDC_MAIN_EDIT);
LoadTextFileToEdit(hEdit, szFileName);
}
}
"