Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Compatible build with GCC #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
32 changes: 32 additions & 0 deletions gcc-build.bat
Original file line number Diff line number Diff line change
@@ -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"
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