Compiling nsDialogs
I was editing the nsDialogs code and got this error when compiling:
browse.obj : error LNK2019: unresolved external symbol __chkstk referenced in function _SelectFileDialog
build\release\nsDialogs\nsDialogs.dll : fatal error LNK1120: 1 unresolved externals
I trimed the code down to find the exact cause of the error. This is as small as I got it
void __declspec(dllexport) SelectFileDialog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
{
char type[5];
char path[1024];
char filter[1024];
char initialDir[1024];
char currentDirectory[1024];
popstring(type, sizeof(type));
popstring(filter, sizeof(filter));
lstrcpy(path, "path");
lstrcpy(initialDir, "path"); // This row makes the compilation fail
GetCurrentDirectory(sizeof(currentDirectory), currentDirectory); // save working dir
}
Why does the compilation fail?