Thread: NSIS 3.0a1
View Single Post
Old 10th October 2013, 12:40   #38
Major Dude
JasonFriday13's Avatar
Join Date: May 2005
Location: New Zealand
Posts: 882
I'm running a 32 bit environment now, and all those errors above have vanished, with a new one (several, actually) popping up:
g++ -o build/urelease/makensis/DialogTemplate.o -c -Wno-non-virtual-dtor -Wall -O2 -DNSISCALL="__attribute__((__stdcall__))" -D_UNICODE -DUNICODE -DMAKENSIS -D_WIN32_IE=0x0500 -Ibuild/urelease/config Source/DialogTemplate.cpp
Source/DialogTemplate.cpp: In function 'void ReadVarLenArr(unsigned char*&, WCHAR*&, unsigned int)':
Source/DialogTemplate.cpp:62:38: error: cannot convert 'WCHAR* {aka short unsigned int*}' to 'const wchar_t*' for argument '1' to 'wchar_t* wcsdup(const wchar_t*)'
I am also getting a bunch of functions that aren't declared: _wcsnicmp, _wcsicmp. It also appears the family of "wcs" functions are either not declared or have type-cast conversion problems. I'm still looking through the source code to find these functions and maybe fix them if I'm confident enough. I wish Visual Studio worked on linux, the "Find in Files" search is so great.

[edit] I managed to type-cast that function above so it will compile, wether it works or not is another story: readInto = _wcsdup((wchar_t*)arr);.

Here's one of the "not declared" errors:
Source/DialogTemplate.cpp: In member function 'void CDialogTemplate::AddItem(DialogItemTemplate)':
Source/DialogTemplate.cpp:306:44: error: '_wcsdup' was not declared in this scope
Also, these functions that aren't declared are confusing, I followed the include chain and the function prototype is definitely being declared, so I don't know what's going on there .

Another question: I see there are some defines like this: '#if 0 '. Are these really needed? Because the number of errors are reduced alot when they are removed (like the one above is resolved). Should I put them in #ifdef _WIN32, #else, #endif blocks? Or remove them altogether?

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
Wiki Profile

Last edited by JasonFriday13; 10th October 2013 at 15:28.
JasonFriday13 is offline   Reply With Quote