Menu

Requesting NotePad++ Compile Error Help

ken
2008-03-14
2012-11-13
  • ken

    ken - 2008-03-14

    I am trying to compile the original (unmodified) NotePad++ v4.8.2 source and have run into a several errors.  I realize that you all are very busy folks, so any time you could spare to assist with this would be greatly appreciated.  I will try to keep this a brief as possible.

    Some initial setup information that may be of help:

    My OS is Windows XP Pro with SP2 and all of the appropriate critical updates.  My C++ compiler is MinGW v5.1.3, where I am using the command prompt (cmd.exe) from which to manually execute commands (for the time being until I set up an appropriate IDE).  I also have CMake v2.4.8 installed.

    I have set up my directory structure as follows (hopefully this makes sense):

    W:\Dev
    W:\Dev\C-C++\cmake-2.4.8-win32-x86  -  CMake executables
    W:\Dev\C-C++\MinGW  -  MinGW executables
    W:\DevWork
    W:\Devwork\NotePad++  -  NotePad++ source, unzipped maintaining original path structure.

    Via a .bat file I changed my path environment variable as follows:

    set PATH=W:\Dev\C-C++\cmake-2.4.8-win32-x86\bin;W:\Dev\C-C++\MinGW\bin;%PATH%

    Ok, so far so good.  From the command prompt I changed directories to:

    W:\DevWork\NotePad++\PowerEditor\src>

    Since we have been supplied with the CMakeLists.txt file I simply executed cmake as follows:

    cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug

    The resulting cmake output is as follows:

    -- Check for working C compiler: W:/Dev/C-C++/MinGW/bin/gcc.exe
    -- Check for working C compiler: W:/Dev/C-C++/MinGW/bin/gcc.exe -- works
    -- Check size of void*
    -- Check size of void* - done
    -- Check for working CXX compiler: W:/Dev/C-C++/MinGW/bin/g++.exe
    -- Check for working CXX compiler: W:/Dev/C-C++/MinGW/bin/g++.exe -- works
    -- Configuring done
    -- Generating done
    -- Build files have been written to: W:/DevWork/NotePad++/PowerEditor/src

    As a quick aside, I did notice the following line in the CMakeLists.txt file:

    SET(vendorIncludDir ../../../vendor/Gemalto/Current/SDK_IASAPI/Output/include)

    This line does not appear to be getting used.  I guess someone along the line was incorporating some sort of security or id card reader functionality of some sort.

    Again, so far so good.  As expected, the appropriate CMakeCache.txt and Makefile files were produced in the /src directory.  Now I simply executed the appropriate make as follows:

    mingw32-make

    The resulting make output is as follows:

    Scanning dependencies of target notepad++
    [  2%] Building CXX object CMakeFiles/notepad++.dir/winmain.obj
    In file included from W:/DevWork/NotePad++/PowerEditor/src/./WinControls/TabBar/ControlsTab.h:23,
                     from W:/DevWork/NotePad++/PowerEditor/src/./ScitillaComponent/UserDefineDialog.h:27,
                     from W:/DevWork/NotePad++/PowerEditor/src/./ScitillaComponent/ScintillaEditView.h:29,
                     from W:\DevWork\NotePad++\PowerEditor\src\Notepad_plus.h:22,
                     from W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:18:
    W:/DevWork/NotePad++/PowerEditor/src/./WinControls/TabBar/TabBar.h: In static member function `static void TabBarPlus::doVertical()':
    W:/DevWork/NotePad++/PowerEditor/src/./WinControls/TabBar/TabBar.h:226: error: `TCS_VERTICAL' was not declared in this scope
    In file included from W:\DevWork\NotePad++\PowerEditor\src\Notepad_plus.h:44,
                     from W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:18:
    W:/DevWork/NotePad++/PowerEditor/src/./WinControls/Preference/preferenceDlg.h:182:26: warning: no newline at end of file
    In file included from W:/DevWork/NotePad++/PowerEditor/src/./WinControls/WindowsDlg/SizeableDlg.h:5,
                     from W:/DevWork/NotePad++/PowerEditor/src/./WinControls/WindowsDlg/WindowsDlg.h:21,
                     from W:\DevWork\NotePad++\PowerEditor\TCS_VERTICALsrc\Notepad_plus.h:45,
                     from W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:18:
    W:/DevWork/NotePad++/PowerEditor/src/./WinControls/WindowsDlg/WinMgr.h:301:7: warning: no newline at end of file
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp: In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)':
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:254: error: `Process' was not declared in this scope
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:254: error: expected `;' before "updater"
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:255: error: `updater' was not declared in this scope
    W:/DevWork/NotePad++/PowerEditor/src/./ScitillaComponent/ScintillaEditView.h: At global scope:
    W:/DevWork/NotePad++/PowerEditor/src/./ScitillaComponent/ScintillaEditView.h:494: warning: inline function `void ScintillaEditView::makeStyle(const char*, const char**)' used but never defined
    mingw32-make[2]: *** [CMakeFiles/notepad++.dir/winmain.obj] Error 1
    mingw32-make[1]: *** [CMakeFiles/notepad++.dir/all] Error 2
    mingw32-make: *** [all] Error 2

    Since the “no newline at end of file” messages are simply warnings I will ignore those for now, unless you feel I should insert newlines at the end of these files.  Also, since the “used but never defined” message is simply a warning I will ignore that for now as well, unless this is supposed to be getting defined somewhere along the line.  If so, then please let me know.

    As seen, the first error is as follows:

    W:/DevWork/NotePad++/PowerEditor/src/./WinControls/TabBar/TabBar.h: In static member function `static void TabBarPlus::doVertical()':
    W:/DevWork/NotePad++/PowerEditor/src/./WinControls/TabBar/TabBar.h:226: error: `TCS_VERTICAL' was not declared in this scope

    Here are the lines in question from TabBar.h:

    static void doVertical() {
      for (int i = 0 ; i < _nbCtrl ; i++)
      {
        if (_hwndArray[i])
          SendMessage(_hwndArray[i], WM_TABSETSTYLE, isVertical(), TCS_VERTICAL);
      }
    };

    The SendMessage line is line 226.  The #define for TCS_VERTICAL does exist in the W:\Dev\C-C++\MinGW\include\commctrl.h header file.  Albeit within an #if (_WIN32_IE >= 0x0300) section, but I am currently using IE 6 on my laptop, so this should not be an issue.  Could it be that TCS_VERTICAL (128) is not a valid value for WM_TABSETSTYLE ((WM_APP + 0x024), where WM_APP=32768)?  Ok, as you can probably tell, I am just starting to learn C++.  Any ideas regarding this issue?

    As seen, the second error is as follows:

    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp: In function `int WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*, int)':
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:254: error: `Process' was not declared in this scope
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:254: error: expected `;' before "updater"
    W:\DevWork\NotePad++\PowerEditor\src\winmain.cpp:255: error: `updater' was not declared in this scope

    Here are the lines in question from winmain.cpp:

    Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str());
    updater.run();

    I am going to guess here, but is there something like “Process *updater = new Process();” missing somewhere?  Any ideas regarding this issue?

    Thanks again for any assistance that can be provided.

     
    • Nobody/Anonymous

      Sounds like some of the include files arent being included. The if the search path is correct, it should contain every single folder in ./src, even ./src itself (You can open the visual studio project files as XML and look, it lists all the directories).
      The TCS_VERTICAL I believe is a windows defined constant, plaese check if WINVER is properly set and _WIN32