Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions gcc-build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@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 NppPluginDemo.dll

cd src

echo Compiling target file...
windres %WRES_MODE% NppPluginDemo.rc -o NppPluginDemo.o
windres %WRES_MODE% DockingFeature/goLine.rc -o goLine.o
g++ *.o *.cpp DockingFeature/*.cpp -DUNICODE -o ../NppPluginDemo.dll ^
%GXX_MODE% -static -shared -lshlwapi

echo Delete unused object files...
del *.o

cd ..

echo Open target file in explorer...
explorer /select, "NppPluginDemo.dll"
2 changes: 1 addition & 1 deletion src/DockingFeature/StaticDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down