4-03 1,239 views
3.0.x编译
namke 编译
编译 x86 版本
在 VS2015 x86 Native Tools Command Prompt 中,先执行
cd /d %WXWIN%\build\msw
然后再通过 nmake 按照以下编译选项进行编译:
Version nmake command
Static libraries x86 Debug nmake /f makefile.vc std=C++11 SHARED=0 BUILD=debug TARGET_CPU=X86 /A
Static libraries x86 Release nmake /f makefile.vc std=C++11 SHARED=0 BUILD=release TARGET_CPU=X86 /A
Dynamic libraries x86 Debug nmake /f makefile.vc std=C++11 SHARED=1 BUILD=debug TARGET_CPU=X86 /A
Dynamic libraries x86 Release nmake /f makefile.vc std=C++11 SHARED=1 BUILD=release TARGET_CPU=X86 /A
编译 x64 版本
在 VS2015 x64 Native Tools Command Prompt 中,先执行
cd /d %WXWIN%\build\msw
然后再通过 nmake 按照以下编译选项进行编译:
Version nmake command
Static libraries x64 Debug nmake /f makefile.vc std=C++11 SHARED=0 BUILD=debug TARGET_CPU=X64 /A
Static libraries x64 Release nmake /f makefile.vc std=C++11 SHARED=0 BUILD=release TARGET_CPU=X64 /A
Dynamic libraries x64 Debug nmake /f makefile.vc std=C++11 SHARED=1 BUILD=debug TARGET_CPU=X64 /A
Dynamic libraries x64 Release nmake /f makefile.vc std=C++11 SHARED=1 BUILD=release TARGET_CPU=X64 /A
v3.0.2编译出错解决
/home/Neo/fsdeps/wxWidgets-3.0.2/bk-deps i686-w64-mingw32-g++ -c -o wxscintilla_Editor.o -DNDEBUG -I./src/stc/scintilla/include -I./src/stc/scintilla/lexlib -I./src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -D__WXMSW__ -D_FILE_OFFSET_BITS=64 -I/home/Neo/fsdeps/wxWidgets-3.0.2/lib/wx/include/msw-unicode-static-3.0 -I./include -DWX_PRECOMP -mthreads -O2 -fno-strict-aliasing ./src/stc/scintilla/src/Editor.cxx
./src/stc/scintilla/src/Editor.cxx: In member function 'long int Editor::FindText(uptr_t, sptr_t)':
./src/stc/scintilla/src/Editor.cxx:5708:7: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding());
^~~~~~~~
In file included from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/memory:81:0,
from ./src/stc/scintilla/src/Editor.cxx:18:
D:/Program_Files/msys64/mingw32/include/c++/6.3.0/bits/unique_ptr.h:49:28: note: declared here
template<typename> class auto_ptr;
^~~~~~~~
./src/stc/scintilla/src/Editor.cxx: In function 'bool Close(Point, Point)':
./src/stc/scintilla/src/Editor.cxx:5844:23: error: call of overloaded 'abs(XYPOSITION)' is ambiguous
if (abs(pt1.x - pt2.x) > 3)
^
In file included from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/cstdlib:75:0,
from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/stdlib.h:36,
from ./src/stc/scintilla/src/Editor.cxx:8:
D:/Program_Files/msys64/mingw32/i686-w64-mingw32/include/stdlib.h:338:15: note: candidate: int abs(int)
int __cdecl abs(int _X);
^~~
In file included from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/stdlib.h:36:0,
from ./src/stc/scintilla/src/Editor.cxx:8:
D:/Program_Files/msys64/mingw32/include/c++/6.3.0/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
D:/Program_Files/msys64/mingw32/include/c++/6.3.0/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
./src/stc/scintilla/src/Editor.cxx:5846:23: error: call of overloaded 'abs(XYPOSITION)' is ambiguous
if (abs(pt1.y - pt2.y) > 3)
^
In file included from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/cstdlib:75:0,
from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/stdlib.h:36,
from ./src/stc/scintilla/src/Editor.cxx:8:
D:/Program_Files/msys64/mingw32/i686-w64-mingw32/include/stdlib.h:338:15: note: candidate: int abs(int)
int __cdecl abs(int _X);
^~~
In file included from D:/Program_Files/msys64/mingw32/include/c++/6.3.0/stdlib.h:36:0,
from ./src/stc/scintilla/src/Editor.cxx:8:
D:/Program_Files/msys64/mingw32/include/c++/6.3.0/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
D:/Program_Files/msys64/mingw32/include/c++/6.3.0/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
make: *** [Makefile:16880: wxscintilla_Editor.o] Error 1