I have problem with calling this function Scintilla_RegisterClasses()
Compiler gives me this error
"MainFile.obj : error LNK2019: unresolved external symbol _Scintilla_RegisterResources referenced in function: "blah blah blah" "
I'm using scintilla 331 version, I only copied and pasted what I downloaded from
Scintilla website in my projects directory.
Assuming you're already linking to the required scintilla libs...
I have the source for Scintilla 3.3.2 (the latest version) and another from a 2010 (not sure what version it is) on my machine and there is no sign of a function called Scintilla_RegisterResources in either of these projects: not in the public headers not in the source.
Actually, checking the Scintilla sample app, it looks like you don't need to call any of the DLL functions yourself. You just need to load Scintilla.DLL using LoadLibrary. Therefore no need for a lib file. See [the] simple sample using Scintilla from C++ on Windows" linked to the Scintilla documentation page for how this is done, it you are unsure.
Do you want to use Scintilla as a DLL or link to it statically?
If you're ok with a DLL, have you got it from the SciTE package (it's called SciLexer.DLL)
Then all you need to do is call LoadLibrary. The DLL does not export Scintilla_RegisterClasses or Scintilla_ReleaseResources. Registration of classes is done for you automatically when the DLL is loaded, and the resources release when the DLL is unloaded.
If you need or want to use it as a static library, then you will have to build it from source following the instructions in the Scintilla documentation and readme. In particular:
On Windows, Scintilla is normally used as a dynamic library as a .DLL file. If you want to link Scintilla directly into your application .EXE or .DLL file, then the STATIC_BUILD preprocessor symbol should be defined and Scintilla_RegisterClasses called. STATIC_BUILD prevents compiling the DllMain function which will conflict with any DllMain defined in your code. Scintilla_RegisterClasses takes the HINSTANCE of your application and ensures that the "Scintilla" window class is registered.