Troubles building and executing NPP
-
You are probably running what you built in “release” build config.
That build requires a “signed” Scintilla DLL.
Since you don’t have a signed DLL, you are out of luck.Hint: Build and run the “debug” build config. This one doesn’t need the “signed” DLL.
-
I have another problem with the “debug” build version. When I execute notepad++.exe by clicking on it or in a command prompt, there is nothing showing up. No error, no warning, no content!
FYI, the version I try to launch is located at “\visual.net\x64\Unicode Debug.”Another thing which looks strange to me is when I run the local debugger on the project, it goes to the file "Notepad_plus.h and show me this error:
When I try to look further, I got this other error which prevent me to further:
I 'm not sure if the first error trigger the second or the opposite but I’m pretty sure that they are related to the launch problem.
-
Do you have the necessary files in the same folder as the
notepad++.exe
you are trying to run? -
I’m having the exact same problem, this is my first “Build from Source” project, though… So I followed the README.txt, Boost binaries all compiled fine(1.70), Regex is compiled fine, but when I try to compile the scintilla.mak using the suggested parameters, I get a ton of compile errors in visual studio. If I compile scintilla.mak without the parameters, scintilla compiles just fine, but the sciLexer.dll that it compiles isn’t recognized by NPP(Obviously because it’s not referenced to anything). When I read the scintilla.mak file, the comments towards the bottom explicitly state the arguments to pass to NMake, they are identical to the README.txt instructions. But again, when I pass the arguments to the NMake on scintilla.mak, I get a ton of warnings and it fails to compile. I’ve triple checked my spelling and all that… and I run NMake from the VS console with the scintilla.proj file opened and with admin permissions. I also attempted to run NPP from the Debug build, and I have the same problems as the OP, nothing opens. I’ll gather screenshots now and inject them into this comment if I can edit, but this is my first post so I might be limited, we’ll see.
-
Expounding my comment with screenshots:
When I compile the cintrilla binaries with the argument ‘nmake BOOSTPATH=C:\sources\boost_1_70_0\ BOOSTREGEXLIBPATH=C:\tmp\scintilla.414\boostregex -f scintilla.mak’ in VS2019 on Windows 10, it fails to compile with >100 errors.
Here’s a shot of my directory folders containing the necessary dependent files for the arguments BOOSTPATH & BOOSTREGEXLIBPATH:
One thing I’m concerned about, is the use of ‘C:\ProgramFiles (x86)’ directory path for my NPP directory location. The reason being is when using the command in PowerShell "cd C:\ProgramFiles (x86)\your-path-here’, the command cd thinks (x86) is a parameter instead of being part of the directory name, so I have to ‘tab-surf’ my cd command to get into the containing directory. Can I safely rename the directory folder for ‘C:\ProgramFiles (x86)’ to ‘C:\ProgramFilesx86’ to eliminate this syntax mess and test it as a solution?
-
Hmmm, I don’t know if it makes any difference, but I would not attempt a build under Powershell. I would build under CMD.exe.
Also, you’d want a CMD.exe that has the environment all set up for building with Visual Studio, like the readme directs.
-
@Alan-Kilborn The ReadME and Windows Documentation recommends running NMake from the Command Console of Visual Studio, I tried to change from Developer PowerShell to Developer Command Prompt to no avail. I’m going to delete NPP, unzip, and try again.
-
I went ahead and tried running the command directly through the cmd.exe with VS Build environment, just to get it out of the way, as well as re-extracting the source files, and I get the same error. Looks like this:
I also went ahead and extracted into the regular program files directory… It’s not a naming syntax issue either it seems… I’m probably messing up on something incredibly silly…
I’m just gonna install with the wizard, spending too much time on this project! But it was fun to try, I’ll be back when I learn more about linking and building binaries from source.
-
My build of the SciLexer.dll project, in two clicks
Run as administrator x86 Native Tools Command Prompt for VS 2017
Copy all code, paste into x86 Native Tools Command Prompt for VS 2017, and press Entercd C:\sources\boost_1_70_0 bootstrap.bat cd C:\sources\boost_1_70_0\libs\regex\build C:\sources\boost_1_70_0\b2.exe toolset=msvc link=static threading=multi runtime-link=static address-model=32 release stage C:\sources\boost_1_70_0\b2.exe toolset=msvc link=static threading=multi runtime-link=static address-model=64 release stage md C:\tmp\boostregexLib\x32 md C:\tmp\boostregexLib\x64 copy C:\sources\boost_1_70_0\stage\lib\libboost_regex-vc141-mt-s-x32-1_70.lib C:\tmp\boostregexLib\x32 copy C:\sources\boost_1_70_0\stage\lib\libboost_regex-vc141-mt-s-x64-1_70.lib C:\tmp\boostregexLib\x64 exit /b
Run as administrator x86 Native Tools Command Prompt for VS 2017
Copy all code, paste into x86 Native Tools Command Prompt for VS 2017, and press Entercd C:\notepad-plus-plus-master\scintilla\win32\ nmake BOOSTPATH=C:\sources\boost_1_70_0\ BOOSTREGEXLIBPATH=C:\tmp\boostregexLib\x32\ -f scintilla.mak copy /y "C:\notepad-plus-plus-master\scintilla\bin\SciLexer.dll" "C:\notepad-plus-plus-master\PowerEditor\bin\SciLexer.dll" exit /b
This is an assembly of the x64 project
Run as administrator x86_x64 Cross Tools Command Prompt for VS 2017
Copy all code, paste into x86_x64 Cross Tools Command Prompt for VS 2017, and press Entercd C:\notepad-plus-plus-master\scintilla\win32\ nmake BOOSTPATH=C:\sources\boost_1_70_0\ BOOSTREGEXLIBPATH=C:\tmp\boostregexLib\x64\ -f scintilla.mak copy /y "C:\notepad-plus-plus-master\scintilla\bin\SciLexer.dll" C:\notepad-plus-plus-master\SciLexer.64.dll exit /b
-
I forgot to say that the project was built on Windows 7 Home Premium (32-bit)
-
@Alan-Kilborn
I’m pretty sure to have the necessary files since there is no change on the branch I’m compiling(master commit=8516c7b).
What I’m not sure about is if it’s from the "\visual.net\x64\Unicode Debug.” that my debug version should be located. It’s auto-generated by VS-2017, so it should normally be right. -
@ErwanDelhoveUCL said in Troubles building and executing NPP:
the version I try to launch is located at “\visual.net\x64\Unicode Debug.”
I don’t think it will run directly from there without “help”: I think you may have to copy some files into that folder as well first.
I’m pretty sure to have the necessary files since there is no change on the branch I’m compiling…
That’s not what I mean.
Okay, here’s what I’d do as a quick test of your built exe:-
Grab a released portable zip.
-
Unzip into a folder.
-
Put your build of
notepad++.exe
in that folder (overwriting the released one). -
Try running that.
I’m not saying for sure that this will solve the problem you cited, but it is worth trying.
-
-
@Alan-Kilborn
I did it with the most recent version(Notepad++ 7.9: Stand with Hong Kong) and it works fine.
I think i found the issue: SciLexer.dll is baldy made or miss some elements(release version is bigger than generated one)
-
@ErwanDelhoveUCL said in Troubles building and executing NPP:
SciLexer.dll is baldy made or miss some elements(release version is bigger than generated one)
So I’m not sure what your goals are for building Notepad++.
Maybe just for fun?But if you are going to experiment and change code, then you want to do this in the “Debug” build.
And with that it doesn’t matter if for Scintilla the “release version is bigger…”
So I think your issues are all solved now?
-
@Alan-Kilborn
I think that you didn’t understand what I wanted to tell you.
I 'm speaking of the SciLexer.dll that I generate myself for the last version of the project. I’ve put the SciLexer.dll version of the release in the debug folder. When I executed the debug version again, it worked!
I deduct so that it was my generated SciLexer.dll who leads to the given error. Maybe I made a mistake in my command line or something like that. So I’m going to investigate there. -
@ErwanDelhoveUCL said in Troubles building and executing NPP:
I think that you didn’t understand what I wanted to tell you.
Correct. :-)
I deduct so that it was my generated SciLexer.dll who leads to the given error.
Maybe I made a mistake in my command line
Hmm, I think if it builds, it should work.
Again, as long as we are talking about a “debug” version ofnotepad++.exe
running it. -
@ErwanDelhoveUCL said in Troubles building and executing NPP:
I think i found the issue: SciLexer.dll is baldy made or miss some elements(release version is bigger than generated one)
The x32 and x64 versions have different file sizes!
-
I got this file size:
-
This post is deleted! -
@andrecool-68
A new problem appear with this following command execution:
FYI i use the x86_x64 Cross Tools Command Prompt for VS 2017 as an adminstratorI got this error in return.
It basically tell me that I should target the same processor. Because the Front end and Back end are not compatible.
Any idea how to fix it?