Skip to content
⌘ NSIS Forum Archive

Compiling nsDialogs

4 posts

TobbeSweden#

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?
TobbeSweden#
I'm compiling this using the nsis build system (SConstruct)

SConstruct uses vc9 in my case. The version is svn HEAD
TobbeSweden#
I made a vc9 solution and compiled it from inside vc instead of using SConstruct. That got rid of all the weird errors I was getting. (I got more weird errors after solving the one I posted about in my first post in this thread)