Neil Hodgson
unread,Mar 29, 2018, 5:37:45 AM3/29/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Scintilla mailing list
On Win32, some files are compiled multiple times with different command-line options to produce various object files. The main option SCI_LEXER chooses whether to include lexing functionality in ScintillaBase.cxx and ScintillaWin.cxx, producing ScintillaBaseL and ScintillaWinL object files. Another option, STATIC_BUILD is used to exclude the main DLLMain entry point and the exported Scintilla_DirectFunction function from ScintillaWin.cxx.
This arrangement makes it more difficult to understand how Scintilla is built and complicates life for those that want to use alternate build tools or integrate Scintilla into applications and libraries.
While SCI_LEXER is difficult to remove, STATIC_BUILD can be removed by adding a new file ScintillaDLL.cxx which contains DllMain and Scintilla_DirectFunction.
Thus, you can build a DLL by including ScintillaDLL and a static library by excluding it. There will be no need to define STATIC_BUILD.
A patch that implements this change is attached.
Neil