【发布时间】:2019-03-13 15:32:00
【问题描述】:
您好,我正在尝试构建 wxWidgets 3.0 以用于代码块。当我运行手册上给出的命令时
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
它说一个错误包括 \include/setup/.h:121:27: fatal error: ../../../lib/vc_x64_lib/mswu/wx/setup.h
它也说
C:\wxWidgets-3.0.4\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
if not exist ..\..\lib\gcc_dll\mswu mkdir ..\..\lib\gcc_dll\mswu
gcc -c -o gcc_mswudll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__ -D_UNICODE -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/platform.h:183:0,
from ..\..\include/wx/defs.h:27,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:12:6: error: #error "This file should only be included when using Microsoft Visual C++"
#error "This file should only be included when using Microsoft Visual C++"
^
In file included from ..\..\include/wx/version.h:16:0,
from ..\..\include/wx/setup.h:19,
from ..\..\include/wx/platform.h:183,
from ..\..\include/wx/defs.h:27,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:113:31: error: pasting "/" and "vc_x64_lib" does not give a valid preprocessing token
wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
我正在关注的手册是:http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
【问题讨论】:
-
您是否只是发布了您的显示器照片而不是复制文本?
-
当我试图发帖时,我的手机出现了很多错误。现在修复它
-
我敢肯定,您所做的不仅仅是该 wiki 中所说的。也许您首先使用
makefile.vc而不是makefile.gcc。删除....lib\gcc_dll\mswu和...build\msw\gcc_whatever并重试。 -
仍然报同样的错误
-
很奇怪。将
include/wx/msw/setup0.h复制到include/wx/msw/setup.h。然后删除我发布的目录。然后再次执行命令行,我会添加指令CXXFLAGS="-std=gnu++11"
标签: c++ codeblocks wxwidgets wxformbuilder