Community

    • Se connecter
    • Recherche
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Recherche

    Error build SciLexer.dll with boost

    Help wanted · · · – – – · · ·
    2
    20
    1941
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • andrecool-68
      andrecool-68 dernière édition par

      This is a quote from a copy of the README file.

      1. Go in scintilla\win32\ then run nmake -f BOOSTPATH=your_boost_root_path BOOSTREGEXLIBPATH=your_built_lib_path scintilla.mak. For example nmake BOOSTPATH=C:\sources\boost_1_70_0\ BOOSTREGEXLIBPATH=C:\tmp\boostregexLib\x64\ -f scintilla.mak

      The created libboost_regex-vc141-mt-s-x64-1_70.lib library was copied to the directory C:\tmp\boostregexLib\x64\

      Imgur

      When I get to point 5 there is an error.

      'nmake' is not recognized as an internal or external command, operable program or batch file

      Imgur

      My installed system:

      Oracle VM VirtualBox x64
      windows 7 home premium x64
      visual studio 2017

      Please tell me what is my mistake.

      Ekopalypse 1 réponse Dernière réponse Répondre Citer 0
      • Ekopalypse
        Ekopalypse @andrecool-68 dernière édition par

        @andrecool-68

        instead of using a standard cmd.exe, use the Visual Studio 2017 Developer Command Prompt.
        I assume the error you get is about not finding the nmake tool.

        andrecool-68 1 réponse Dernière réponse Répondre Citer 4
        • andrecool-68
          andrecool-68 @Ekopalypse dernière édition par

          @Ekopalypse
          Now there is a new error:

          LINK : fatal error LNK1104: can not open file "libboost_regex-vc141-mt-s-x
          32-1_70.lib"
          NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio\2017\
          Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\link.EXE" : returned
          code "0x450"
          Stop.

          I changed the command (deleted the line address-model=64)
          C:\sources\boost_1_70_0\bjam.exe toolset=msvc link=static threading=multi runtime-link=static address-model=64 release stage

          C:\sources\boost_1_70_0\bjam.exe toolset=msvc link=static threading=multi runtime-link=static release stage

          There are currently two libraries.

          Imgur

          Then the file was collected (I understand that it is for x32)
          C:\notepad-plus-plus-master\scintilla\bin\SciLexer.dll

          Imgur

          There are more questions.
          Authenticode check failed: signing certificate or hash is not recognized
          How exactly to sign the certificate and how to build SciLexer.dll for x64

          Ekopalypse 1 réponse Dernière réponse Répondre Citer 0
          • Ekopalypse
            Ekopalypse @andrecool-68 dernière édition par

            @andrecool-68

            Please keep in mind that I’m not really a C++ developer. I just have started investigating this language a few weeks ago. So treat my answers with skeptic.

            Depending on your VS project you either build x86 or x64 binaries and depending on that configuration VS would grab the one or the other boost::regex library as long as
            the libs can be found.

            Concerning the “Authenticode check failed” issue,
            as far as I understood, a npp debug build can be created without a signed scintilla dll but release builds are checking for signed dlls.
            Source is this.

            You either can change the code to isOK = true; or you create your own certificates.
            But how creating a singend scintilla is done I haven’t investigated yet. Not sure I ever will.

            1 réponse Dernière réponse Répondre Citer 3
            • andrecool-68
              andrecool-68 dernière édition par

              @Ekopalypse
              To build SciLexer.dll x64 I used x64 Native Tools Command Prompt for VS 2017
              I now have two files:
              x32 SciLexer.dll ~ 1.22 mb
              x64 SciLexer.dll ~ 1.73 mb

              It remains to understand how to pee this “nasty” certificate)))

              Ekopalypse 1 réponse Dernière réponse Répondre Citer 2
              • Ekopalypse
                Ekopalypse @andrecool-68 dernière édition par

                @andrecool-68

                Does this mean you haven’t used Visual Studio 2017 to build notepad++ at all?
                Did you only build scintilla dll and copied it into an existing npp installation?

                andrecool-68 2 réponses Dernière réponse Répondre Citer 2
                • andrecool-68
                  andrecool-68 @Ekopalypse dernière édition par

                  @Ekopalypse
                  Notepad ++ was compiled from the last project of the author. Build release gives certificate error.

                  1 réponse Dernière réponse Répondre Citer 2
                  • andrecool-68
                    andrecool-68 @Ekopalypse dernière édition par

                    @Ekopalypse The debug build works without a certificate error))

                    Ekopalypse 1 réponse Dernière réponse Répondre Citer 2
                    • Ekopalypse
                      Ekopalypse @andrecool-68 dernière édition par

                      @andrecool-68

                      Yes, great - that is expected

                      andrecool-68 1 réponse Dernière réponse Répondre Citer 1
                      • andrecool-68
                        andrecool-68 @Ekopalypse dernière édition par

                        @Ekopalypse The author himself will add a signature to the next build project … did I understand you correctly?

                        Ekopalypse 2 réponses Dernière réponse Répondre Citer 2
                        • Ekopalypse
                          Ekopalypse @andrecool-68 dernière édition par Ekopalypse

                          @andrecool-68

                          Yes, if you refer to the release build.
                          Debug builds will never have such a signature to allow code contributors to easily test there changes/modifications. That’s my understanding.

                          Edit: With release build I mean the binaries delivered by either the installation or a portable zip.

                          1 réponse Dernière réponse Répondre Citer 2
                          • Ekopalypse
                            Ekopalypse @andrecool-68 dernière édition par

                            @andrecool-68

                            My lunch break is over - I will follow up later today.

                            andrecool-68 1 réponse Dernière réponse Répondre Citer 1
                            • andrecool-68
                              andrecool-68 @Ekopalypse dernière édition par

                              @Ekopalypse Discussio mater veritas est

                              Ekopalypse 2 réponses Dernière réponse Répondre Citer 1
                              • Ekopalypse
                                Ekopalypse @andrecool-68 dernière édition par

                                @andrecool-68 or better In vino veritas :-D

                                1 réponse Dernière réponse Répondre Citer 2
                                • Ekopalypse
                                  Ekopalypse @andrecool-68 dernière édition par

                                  @andrecool-68
                                  I found this commit and it looks like that this is the area
                                  where one would need to hack around to create its own key but as said, I don’t really know how this certificates stuff work, yet.

                                  andrecool-68 1 réponse Dernière réponse Répondre Citer 3
                                  • andrecool-68
                                    andrecool-68 @Ekopalypse dernière édition par

                                    @Ekopalypse

                                    Interesting things, there is a GPG public key
                                    https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/nppGpgPub.asc
                                    But after building projects SciLexer.dll and notepad ++.exe

                                    When starting notepad ++.exe an error appears
                                    Authenticode check failed: signing certificate or hash is not recognized

                                    Where is the truth hiding?

                                    1 réponse Dernière réponse Répondre Citer 1
                                    • andrecool-68
                                      andrecool-68 dernière édition par

                                      Maybe I have some components missing in Visual Studio 2017?

                                      {
                                      	"version": "1.0",
                                      	"components": [
                                      		"Microsoft.VisualStudio.Workload.NativeDesktop",
                                      		"microsoft.visualstudio.component.vc.cmake.project",
                                      		"microsoft.visualstudio.componentgroup.nativedesktop.win81",
                                      		"microsoft.visualstudio.componentgroup.nativedesktop.winxp",
                                      		"microsoft.visualstudio.component.vc.atlmfc",
                                      		"microsoft.visualstudio.component.windows10sdk.10586",
                                      		"microsoft.visualstudio.component.vc.140"
                                      	]
                                      }
                                      
                                      Ekopalypse 1 réponse Dernière réponse Répondre Citer 0
                                      • Ekopalypse
                                        Ekopalypse @andrecool-68 dernière édition par Ekopalypse

                                        @andrecool-68

                                        I don’t think that you are missing something regarding the certification process.
                                        It is expected that you cannot build a release version and use it with a non-signed scintilla dll.
                                        Only debug builds can be used in this manner unless you change the code in the release build.

                                        The way it works, as far as I understand, is like this.

                                        You build a release version of scintilla.
                                        You sign the scintilla dll with your private key.
                                        You put the public key, which is one result from signing the dll, into notepad++ and build the release version.
                                        Now on startup, I assume, it won’t report that error.

                                        The exact details on how to do it, I haven’t figured out yet.
                                        There are still too many open questions for me about the whole PKI thinggy.

                                        andrecool-68 2 réponses Dernière réponse Répondre Citer 1
                                        • andrecool-68
                                          andrecool-68 @Ekopalypse dernière édition par

                                          @Ekopalypse
                                          I did not understand where to put this key before building the project.

                                          1 réponse Dernière réponse Répondre Citer 0
                                          • andrecool-68
                                            andrecool-68 @Ekopalypse dernière édition par

                                            @Ekopalypse

                                            https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/README.md
                                            In the README file, I cannot understand what exactly needs to be done with this public key.

                                            1 réponse Dernière réponse Répondre Citer 0
                                            • Premier message
                                              Dernier message
                                            Copyright © 2014 NodeBB Forums | Contributors