Multiple errors building NPP 7.5.6



  • Hello,

    Building NPP 7.5.6 with VS Community 2013 results in multiple errors.

    default

    And many more.

    The last version I built successfully was NPP 7.5.

    I’d appreciate your help.



  • @Yaron

    Hi Yaron,

    long time not seen - how you are doing, hopefully fine.
    As of MS, those should be available in <sys\stat.h>
    Maybe you need to include this in VS 2013 CE explicitly.

    Cheers
    Claudia



  • That must be my fault - I compiled Notepad++ only in VS 2015, did not try the 2013 one.
    The additional #include <sys/stat.h> should fix it indeed.



  • Hello Claudia,

    It’s always a pleasure to communicate with you.
    I’m fine, thank you. I hope you’re as well.

    Adding #include <sys/stat.h> to Common.cpp has indeed solved the errors appearing in the screenshot above.

    I’m still getting the these errors.

    Could you please enlighten me as to how you found <sys/stat.h>?
    Did you search _S_IREAD?

    Thank you for your kind help. I do appreciate it.


    Hello Vitaliy,

    Thank you for your reply too. Appreciated.

    Best regards.



  • @Yaron

    thx, I’m fine.

    Yes,actually I was searching for _S_IREAD and _S_IEXEC
    and I always add msdn if it is development related,
    to the search to get the MS ones first.

    But looks like there is something in addition missed.
    Let’s see what the gitlog says about changes.

    'Till then …

    Cheers
    Claudia



  • @Yaron

    the new version uses keywords like noexcept which aren’t available for
    VS versions < 2015, so we either could try to hack around by defining macros
    changing source code etc… or you need to update to a newer VS.

    Btw. I’m really impressed about VS2017 which works even on my old pc and
    running in a virtual machine very well.

    Cheers
    Claudia



  • VS 2013 does not completely comply even with C++11, not saying about C++14, so a newer version of VS is recommended.
    It may be strange to hear such words from a person who wants Notepad++ to be compatible with Windows XP and who was still using VS 2005 (together with VS 2013, though) just a year or two ago, but:

    1. VS 2015 and VS 2017 does support Windows XP targeting and
    2. the newer VS version is used the more latest C++ features are available to the developers.

    Taking this into account, as well as the availability of free Community or Express versions of latest VS, there is no much sense in staying on VS 2013 - plus, VS 2013 and VS 2015 or newer can co-exist under the very same system, if there is a need to still have VS 2013.



  • Hello Claudia,

    Thanks again for looking into it and solving the problem. I do appreciate it.

    I understand I should be able to build NPP with VS 2017 (using notepadPlus.vcxproj and not notepadPlus.vs2013.vcxproj), correct?

    VS installation is quite mammoth. :)
    How would you handle it? Completely uninstalling VS 2013 (assuming I don’t need it)?


    Hello Vitaliy,

    Thank you for the additional info. I appreciate that.

    Best regards.



  • Hi Yaron,

    if you don’t need VS2013 anymore, why wasting GB of space - remove it
    but as Vitaliy stated, both can coexist just in case you still need it.
    Unfortunately VS2017 forces you to have windows account otherwise you can’t
    unlock the test version and yes, the vcxproj is the one I used as well.

    Cheers
    Claudia



  • Hello Claudia,

    Thanks again for your kind help. Appreciated as always.

    Best regards.



  • Hello Claudia and Vitaliy,

    Last week I installed VS 2017 Community and built NPP 7.5.6.
    Thanks again for your help.

    I tried today to check Preferences -> General -> Document List Panel - Show and NPP crashed.
    Thinking it was due to some of my code changes, I downloaded the repository again and built it as is. The same result - NPP crashes.

    Building:
    I doubled clicked notepadPlus.vcxproj, was prompted to add support for xp and built the solution.

    Using the original binary included in the official packages, the crash does not occur.
    Any idea?

    Best regards.



  • Hi @Yaron ,

    as I did - but no crashes so far
    and is this reproducible?

    Which VS version do you run?

    Microsoft Visual Studio Community 2017 
    Version 15.6.3
    VisualStudio.15.Release/15.6.3+27428.2011
    Microsoft .NET Framework
    Version 4.7.02558
    
    Installed Version: Community
    

    Did you change something on the build process? Build events?
    How do you start npp? From within the build directory?
    x64 or x32 ? (I tested only x64)

    Cheers
    Claudia



  • Hello Claudia,

    Thank you very much for the prompt reply. I do appreciate it.

    default

    The only thing I modified was from x64 to x86 and to Release instead of Debug.
    No errors or warnings.

    I’ve used it for a few days without any problem.
    Trying today to display the Document List Panel, the crash happened.
    It is consistent; whenever I try to check that option NPP crashes.

    default

    I downloaded a fresh portable NPP and replaced the binary with my build.

    Best regards.



  • Yaron, just did a x86 release build and looks ok - I guess you assumed that this is the case.

    From the code I only could guess that there might be a problem with your configuration files.

    If you have downloaded an official zipped package, could you replace the
    official builded npp exe with the one you build and run it within this directory.

    If this works then it indicates that one of your configuration files is corrupt.

    If it doesn’t work … hmmm … which operating system do you run?

    Cheers
    Claudia



  • Hello Claudia,

    Thanks again for your time and effort.

    If you have downloaded an official zipped package, could you replace the
    official builded npp exe with the one you build and run it within this directory.

    That is just what I have done. :)
    Win 7 x32.

    Best regards.



  • I thought you did it the other way, you copied the official exe to your directory
    but I was looking for copying your exe to the official unzipped directory, so that
    your exe is running with the official configuration files.
    Or did you already check both ways?

    Cheers
    Claudia



  • Both ways.

    Thanks again. Appreciated.



  • Yaron ,

    then I would say time to debug. Either run from within VS (copy everything to the build
    directory) or attach it to the running exe, but then make sure the pdb files are found.
    Just for info - I have to stay up early tomorrow so I have to stop here.
    But if there is anything I could do we can follow up tomorrow night :-)

    Cheers
    Claudia



  • Hello Claudia,

    I’ve never used the Debugger. :)
    It might also be some general setting I’ve modified in VS.
    We’ll see tomorrow.

    Thanks again and good night.



  • Hello Claudia,

    I’ve created a Dump file, opened it in VS and used “Debug with Native Only”.

    default

    Interestingly, if I check Hide Extension Column first and then Show - the crash does not happen.

    Whenever you have some free time. Thanks again.

    Best regards.


Log in to reply