How to compile notepad++ with mingw or clang?
-
Left shintilla folder, went into PowerEditor/gcc folder, run mingw32-make
Errors.
Here is the output:
notepad-plus-plus-6.9.1\PowerEditor\gcc>mingw32-make
g++ -include./include/various.h -DTIXML_USE_STL -DTIXMLA_USE_STL -DUNICODE -D_UNICODE -std=c++14 -fpermissive -I…/src -I…/src/WinControls -I…/src/WinControls/AboutDlg -I…/src/WinControls/AnsiCharPanel -I…/src/WinControls/ClipboardHistory -I…/src/WinControls/ContextMenu -I…/src/WinControls/ColourPicker -I…/src/WinControls/DockingWnd -I…/src/WinControls/DocumentMap -I…/src/WinControls/FindCharsInRange -I…/src/WinControls/FunctionList -I…/src/WinControls/Grid -I…/src/WinControls/ImageListSet -I…/src/WinControls/OpenSaveFileDialog -I…/src/WinControls/Preference -I…/src/WinControls/ProjectPanel -I…/src/WinControls/shortcut -I…/src/WinControls/SplitterContainer -I…/src/WinControls/StaticDialog -I…/src/WinControls/StaticDialog/RunDlg -I…/src/WinControls/StatusBar -I…/src/WinControls/TabBar -I…/src/WinControls/TaskList -I…/src/WinControls/ToolBar -I…/src/WinControls/ToolTip -I…/src/WinControls/TrayIcon -I…/src/WinControls/VerticalFileSwitcher -I…/src/WinControls/WindowsDlg -I…/src/uchardet -I…/src/TinyXml -I…/src/TinyXml/tinyXmlA -I…/src/ScitillaComponent -I…/src/MISC -I…/src/MISC/Common -I…/src/MISC/Exception -I…/src/MISC/PluginsManager -I…/src/MISC/Process -I…/src/MISC/RegExt -I…/…/scintilla/include -I./include -MMD -c …/src/Utf8_16.cpp -o …/src/Utf8_16.o
In file included from …/src/TinyXml/tinyXmlA/tinyxmlA.h:63:0,
from …/src/Parameters.h:30,
from …/src/Utf8_16.h:27,
from …/src/Utf8_16.cpp:19:
…/src/MISC/Common/Common.h:179:46: error: ‘_locale_t’ has not been declared
double stodLocale(const generic_string& str, _locale_t loc, size_t* idx = NULL);
^
In file included from …/src/Parameters.h:46:0,
from …/src/Utf8_16.h:27,
from …/src/Utf8_16.cpp:19:
…/src/WinControls/ToolBar/ToolBar.h: In member function ‘void ToolBar::setDefaultImageList()’:
…/src/WinControls/ToolBar/ToolBar.h:135:25: error: ‘TB_SETIMAGELIST’ was not declared in this scope
::SendMessage(_hSelf, TB_SETIMAGELIST , (WPARAM)0, (LPARAM)_toolBarIcons.getDefaultLst());
^
…/src/WinControls/ToolBar/ToolBar.h: In member function ‘void ToolBar::setHotImageList()’:
…/src/WinControls/ToolBar/ToolBar.h:138:25: error: ‘TB_SETHOTIMAGELIST’ was not declared in this scope
::SendMessage(_hSelf, TB_SETHOTIMAGELIST , (WPARAM)0, (LPARAM)_toolBarIcons.getHotLst());
^
…/src/WinControls/ToolBar/ToolBar.h: In member function ‘void ToolBar::setDisableImageList()’:
…/src/WinControls/ToolBar/ToolBar.h:141:25: error: ‘TB_SETDISABLEDIMAGELIST’ was not declared in this scope
::SendMessage(_hSelf, TB_SETDISABLEDIMAGELIST, (WPARAM)0, (LPARAM)_toolBarIcons.getDisableLst());
^
…/src/Utf8_16.cpp: In member function ‘void Utf8_16_Read::determineEncoding()’:
…/src/Utf8_16.cpp:208:57: warning: NULL used in arithmetic [-Wpointer-arith]
else if (m_nLen > 1 && m_nLen % 2 == 0 && m_pBuf[0] != NULL && m_pBuf[1] == NULL && IsTextUnicode(m_pBuf, m_nLen, &uniTest))
^
…/src/Utf8_16.cpp:208:78: warning: NULL used in arithmetic [-Wpointer-arith]
else if (m_nLen > 1 && m_nLen % 2 == 0 && m_pBuf[0] != NULL && m_pBuf[1] == NULL && IsTextUnicode(m_pBuf, m_nLen, &uniTest))
^
makefile:254: recipe for target ‘…/src/Utf8_16.o’ failed
mingw32-make: *** […/src/Utf8_16.o] Error 1 -
I have a request. Can somebody who successfully compiled notepad++ 6.9.1 with something other than visual studio also upload all object files? It will help me, because then I can figure out each error separately, without trying to recompile all at once.
Would be nice if you could also upload your compiler too. It shouldn’t be too heavy.
My errors are probably because I’m using 32bit mingw instead of 64bit one.
-
Anybody?
-
Inside PowerEditor/gcc/readme.txt i found this:
It was tested with a MinGW-w64 distribution containing
GCC 5.2.0 (cross-compiled with i686-w64-mingw32 on Arch Linux) and
GCC 4.9.2 (natively on Windows 7, will not work anymore with this version).Don’t really understood what this means. This means I shouldn’t use GCC 4.9.2? “I wouldn’t ever test with this version anymore”, or “This compiler failed to compile on this version”?
shintilla and PowerEditor use different compilers? shintilla mentioned TDM Mingw32 4.7.1, what is the difference between Mingw and TDM Mingw?
-
Anybody? There is no way I’ll figure this out by myself.
-
Visual Studios is the only officially supported compiler for N++. I’m not sure how many people actually use GCC/MinGW. I know the makefiles/etc were updated recently but not sure what all that added. I guess you’ll just have to wait to see if someone else has used MinGW successfully or contact the author of those commits.
-
Huh, I opened https://github.com/notepad-plus-plus/notepad-plus-plus/commits/master/PowerEditor/gcc , and it really changed only twice in all this time…
How can I contact this person https://github.com/marcows ? I registered on github, but I don’t see how I can send messages there.
-
and it really changed only twice in all this time
Like I said, it’s not officially supported. The only need I know for it is so some people can try to compile it and get it running under Wine in Linux.
How can I contact this person
Github doesn’t have direct messaging. Probably your best bet is to post a reply to that Pull Request that added these updates
-
Posted here
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/1229
and here
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/385
. Let’s refresh three threads from now on. -
I’m also interested in this, compiling notepad with GCC
VS is too big and its installation is painful.