diff --git a/gcc-build.bat b/gcc-build.bat new file mode 100644 index 0000000..bf44eae --- /dev/null +++ b/gcc-build.bat @@ -0,0 +1,32 @@ +@echo off + +:: Set build in 32-bit mode or not +set BUILD_32=1 + +if %BUILD_32% == 1 ( + echo Build in 32-bit mode + set WRES_MODE=-F pe-i386 + set GXX_MODE=-m32 +) else ( + echo Build in 64-bit mode + set WRES_MODE= + set GXX_MODE= +) + +echo Delete last built file... +del NppPluginTemplate.dll + +cd src + +echo Compiling target file... +windres %WRES_MODE% NppPluginDemo.rc -o NppPluginDemo.o +g++ *.o *.cpp -DUNICODE -o ../NppPluginTemplate.dll ^ + %GXX_MODE% -static -shared -lshlwapi + +echo Delete unused object files... +del *.o + +cd .. + +echo Open target file in explorer... +explorer /select, "NppPluginTemplate.dll" diff --git a/src/DockingFeature/StaticDialog.cpp b/src/DockingFeature/StaticDialog.cpp index dd7dfd5..4cf303b 100644 --- a/src/DockingFeature/StaticDialog.cpp +++ b/src/DockingFeature/StaticDialog.cpp @@ -204,7 +204,7 @@ HGLOBAL StaticDialog::makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplat std::wstring GetLastErrorAsString(DWORD errorCode) { - std::wstring errorMsg(_T("")); + std::wstring errorMsg(TEXT("")); // Get the error message, if any. // If both error codes (passed error n GetLastError) are 0, then return empty if (errorCode == 0)