Community
    • Login

    Building Notepad++ with Visual Studio 2015/2017

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    21 Posts 10 Posters 18.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • proengP
      proeng
      last edited by

      I solved it, now i am trying to solve the build order and how to include it in the right place.
      The solution was obvious i accidentally removed the bin directory, the one in the root directory.

      1 Reply Last reply Reply Quote 0
      • proengP
        proeng
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • nreckerN
          nrecker
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • nreckerN
            nrecker
            last edited by

            Ah, I’ve gotten it to build. I needed to switch the project from the 2015 toolset to the 2017 toolset.

            1 Reply Last reply Reply Quote 0
            • moon6969M
              moon6969
              last edited by

              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:
              libboost_regex-vc141-mt-s-1_65_1.lib
              vs
              libboost_regex-vc141-mt-s-x32-1_66.lib

              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

              • Copied scintilla\bin\SciLexer.dll to PowerEditor\visual.net\Unicode Debug\
              • When opening notepad-plus-plus-7.6.3\PowerEditor\visual.net\notepadPlus.vcxproj the first time, I was prompted by VS to “Retarget Projects” to v141_xp.
              • Changed the VS “Solution Platform” from x64 to x86
              1 Reply Last reply Reply Quote 2
              • moon6969M
                moon6969
                last edited by

                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”
                • cd <base>\boost_1_72_0\
                • bootstrap.bat
                • cd <base>\boost_1_72_0\libs\regex\build
                • <base>\boost_1_70_2\b2.exe toolset=msvc link=static threading=multi runtime-link=static release stage
                • Copy libboost_regex-vc141-mt-s-x32-1_72.lib to <base>\boost.tmp\
                  NB: Contrary to github guide (step 4), I found libboost_regex-vc141-mt-s-x32-1_72.lib in:
                  <base>\boost_1_72_0\stage\lib\ .
                • cd <base>\notepad-plus-plus-7.8.2\scintilla\win32\
                • nmake BOOSTPATH=<base>\boost_1_72_0\ BOOSTREGEXLIBPATH=<base>\boost.tmp\ -f scintilla.mak
                • Copy <base>\notepad-plus-plus-7.8.2\scintilla\bin\SciLexer.dll
                  to <base>\notepad-plus-plus-7.8.2\PowerEditor\visual.net\Unicode Debug\
                • Open <base>\notepad-plus-plus-7.8.2\PowerEditor\visual.net\notepadPlus.vcxproj in VS2017
                • 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

                Alan KilbornA 1 Reply Last reply Reply Quote 3
                • Alan KilbornA
                  Alan Kilborn @moon6969
                  last edited by

                  @moon6969 said in Building Notepad++ with Visual Studio 2015/2017:

                  NB: If debugging NPP from within VS, enable Multi-instance in NPP settings

                  Or…what I do is add it to the VS properties like so (shown for VS2019):

                  51c31c91-a44d-45f4-a33b-8b5ee03fc37b-image.png

                  1 Reply Last reply Reply Quote 3
                  • moon6969M
                    moon6969
                    last edited by

                    Build successfull on newly installed Visual Studio 2019 Community Edition. I followed the above v7.8.2 notes.

                    On opening 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…
                    C4834: discarding return value of function with 'nodiscard' attribute

                    VS2019 was treating it as an error, so I added /Wv:19.10 compiler option (to use an earlier C++ versions warnings)…
                    Notepad++CompilerWarningSettings.png

                    moon6969M 1 Reply Last reply Reply Quote 2
                    • moon6969M
                      moon6969 @moon6969
                      last edited by moon6969

                      @moon6969 said in Building Notepad++ with Visual Studio 2015/2017:

                      On first build, there is a new C++ warning…
                      C4834: discarding return value of function with 'nodiscard' attribute

                      Disclaimer: I’ve no idea what this warning means or the impact of ignoring it… but it seems to work :)

                      EkopalypseE Alan KilbornA 2 Replies Last reply Reply Quote 1
                      • EkopalypseE
                        Ekopalypse @moon6969
                        last edited by

                        @moon6969

                        not that I understand what they are talking about here.

                        1 Reply Last reply Reply Quote 1
                        • Alan KilbornA
                          Alan Kilborn @moon6969
                          last edited by

                          @moon6969

                          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)

                          EkopalypseE 1 Reply Last reply Reply Quote 1
                          • EkopalypseE
                            Ekopalypse @Alan Kilborn
                            last edited by

                            @Alan-Kilborn

                            the C4834 link directs to this warning setting.

                            Alan KilbornA 1 Reply Last reply Reply Quote 1
                            • Alan KilbornA
                              Alan Kilborn @Ekopalypse
                              last edited by

                              @Ekopalypse

                              Ah, never knew that. Presume one could also use 19.10.25017.0 in this case.

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors