Building Notepad++ with Visual Studio 2015/2017
The final thing was changing the project to 86 instead of 64. So basically Gary Blooms version works fine for me
And you may ask why did i do 3 posts and not edit 1? Well for some reason this site don’t allow you to edit your post after 180 seconds, which is weird but hey when in rome.
Greetings! I am trying to build Notepad++ with Visual Studio 2017, but I’m having some difficulties. I’m following Gary Bloom’s plan and I’ve gotten as far as changing the build from x64 to x86 without any problems. However, when I try to build it, I get the following error message:
fatal error C1083: Cannot open include file: ‘atlbase.h’: No such file or directory
I have confirmed that both “Visual C++ ATL Support” and “MFC and ATL Support (x86 and x64)” are installed, but the issue persists. Any advice?
Ah, I’ve gotten it to build. I needed to switch the project from the 2015 toolset to the 2017 toolset.
Build notes from NPP v7.6.3
Use Boost 1_65_1 to build scintilla.dll
First looked at using latest Boost 1_69_0, but failed.
Since Boost 1_66_0, the Boost lib file name structure now has extra “x32” detail:
This causes issue in BuildBoost.bat since it can’t autodetect the library file.
This can be worked around using
--toolset msvc-14.1, but then scintilla.mak fails with some architecture related error from Boost source…
boost_1_69_0\boost/type_traits/detail/is_function_cxx_11.hpp(111): error C2218: '__vectorcall' cannot be used with '/arch:IA32'
So I just continued using Boost 1_65_1 (and Gary Bloom’s above buildboost2017.bat).
Build notepadPlus.vcxproj in VS2017
- When opening
notepad-plus-plus-7.6.3\PowerEditor\visual.net\notepadPlus.vcxprojthe first time, I was prompted by VS to “Retarget Projects” to v141_xp.
- Changed the VS “Solution Platform” from x64 to x86
Build notes for NPP v7.8.2 32bit with Visual Studio 2017 on Win10
Build process on NPP’s github has been updated to no longer include requirement for BuildBoost*.bat. It worked pretty smoothly, except for minor difference with boost_1_72_0 compared to boost_1_70_0.
Use Boost 1_72_0 to build SciLexer.dll
- Download boost_1_72_0 from https://www.boost.org/
- Open “Visual Studio 2017 Developer Command Prompt”
<base>\boost_1_70_2\b2.exe toolset=msvc link=static threading=multi runtime-link=static release stage
NB: Contrary to github guide (step 4), I found libboost_regex-vc141-mt-s-x32-1_72.lib in:
nmake BOOSTPATH=<base>\boost_1_72_0\ BOOSTREGEXLIBPATH=<base>\boost.tmp\ -f scintilla.mak
- Change configuration to x86
- Build & enjoy
NB: If debugging NPP from within VS, enable Multi-instance in NPP settings or close other instances of notepad++.exe
Build successfull on newly installed Visual Studio 2019 Community Edition. I followed the above v7.8.2 notes.
notepadPlus.vcxproj, I accepted prompt in VS2019 to upgrade SDK to v10 and Platform Toolset to v142.
On first build, there is a new C++ warning…
discarding return value of function with 'nodiscard' attribute
VS2019 was treating it as an error, so I added
/Wv:19.10compiler option (to use an earlier C++ versions warnings)…
so I added /Wv:19.10 compiler option
Where did you get the idea to use that exact number?
(I just turn off “treat warnings as errors” instead when I have built the source code)
the C4834 link directs to this warning setting.
Ah, never knew that. Presume one could also use 19.10.25017.0 in this case.