jacobslusser / ScintillaNET

A Windows Forms control, wrapper, and bindings for the Scintilla text editor.
MIT License
963 stars 243 forks source link

How to compile Scintilla for both x86 and x64 #457

Open leojazz opened 5 years ago

leojazz commented 5 years ago

Hi,

How do I compile Scintilla for both x86 and x64 ? So I'll have two dlls, one for 32 bit and one for 64 bit.

I have Visual C++.

Thanks

tobeypeters commented 5 years ago

ScintillaNet or Scintilla? ScintillaNet is written in CSharp. Scintilla itself ...

Readme says: Visual C++: nmake -f scite.mak

You can try to throw an email to neilh@scintilla.org. Not sure, if he'll answer you.

forever2020 commented 4 years ago

I have the same problem for the Scilexer.dll x86 i compile the makefile by mingw32-make.exe and i don't know how to do to obtain x64

xv commented 4 years ago

I have the same problem for the Scilexer.dll x86 i compile the makefile by mingw32-make.exe and i don't know how to do to obtain x64

There are two ways of doing it. The Visual Studio way is the easiest. I'll go over both.

Visual Studio:

Scintilla 4.x.x (current major version) uses C++ 17, meaning you will need Visual Studio 2017 and up to compile it. Our wrapper uses Scintilla 3.x.x. I'm not sure which version of C++ it used, so it may or may not work with older releases of Visual Studio.

You have a project file at scintilla\win32\SciLexer.vcxproj. Open it and you can easily change the target platform from the toolbar combobox.

Imgur

The resulting binaries would be in:

MinGW:

Assuming you have the environment variable already set for MinGW, do:

cd scintilla\win32
mingw32-make

The "MinGW" project only supports 32-bit compilation. To compile as 64-bit you will need to download and use "MinGW-w64" instead.

MinGW MinGW-w64

forever2020 commented 4 years ago

Thanks a lot for help