Я пытаюсь скомпилировать WxWidgets 3.0.2 проект на Windows 10 с TDM-GCC 4.7.1 32bit, я получаю эту ошибку ниже:WxWidgets проект компиляции не будет работать на Windows 10 с TDM-GCC
Компиляция
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -std=c++11 -g -Wall -std=c++11 -g -Ilibrary\xerces-c-3.1.1\src -Ilibrary\mupdf-1.6\include -Ilibrary\wxWidgets-3.0.2\include -Ilibrary\wxWidgets-3.0.2\lib\wx\include\msw-unicode-3.0\ -Iinclude -IC:\TDM471-32\include -IC:\TDM471-32\include -c F:\Proj\Document.cpp -o obj\Debug\Document.o
Ошибки
In file included from library\wxWidgets-3.0.2\include/wx/string.h:45:0,
from library\wxWidgets-3.0.2\include/wx/memory.h:15,
from library\wxWidgets-3.0.2\include/wx/object.h:19,
from library\wxWidgets-3.0.2\include/wx/wx.h:15,
from F:\Proj\Document.h:4,
from F:\Proj\Document.cpp:1:
library\wxWidgets-3.0.2\include/wx/wxcrtbase.h: In function 'wchar_t* wxStrdup(const wchar_t*)':
library\wxWidgets-3.0.2\include/wx/wxcrtbase.h:680:68: error: 'wcsdup' was not declared in this scope
In file included from library\wxWidgets-3.0.2\include/wx/string.h:45:0,
from library\wxWidgets-3.0.2\include/wx/memory.h:15,
from library\wxWidgets-3.0.2\include/wx/object.h:19,
from library\wxWidgets-3.0.2\include/wx/wx.h:15,
from F:\Proj\Main.cpp:1:
library\wxWidgets-3.0.2\include/wx/wxcrtbase.h: In function 'wchar_t* wxStrdup(const wchar_t*)':
library\wxWidgets-3.0.2\include/wx/wxcrtbase.h:680:68: error: 'wcsdup' was not declared in this scope
In file included from library\wxWidgets-3.0.2\include/wx/crt.h:19:0,
In file included from library\wxWidgets-3.0.2\include/wx/crt.h:19:0,
from library\wxWidgets-3.0.2\include/wx/string.h:4305,
from library\wxWidgets-3.0.2\include/wx/memory.h:15,
from library\wxWidgets-3.0.2\include/wx/object.h:19,
from library\wxWidgets-3.0.2\include/wx/wx.h:15,
from F:\Proj\Document.h:4,
from F:\Proj\Document.cpp:1:
library\wxWidgets-3.0.2\include/wx/wxcrt.h: In function 'size_t wxStrnlen(const char*, size_t)':
library\wxWidgets-3.0.2\include/wx/wxcrt.h:173:92: error: 'strnlen' was not declared in this scope
library\wxWidgets-3.0.2\include/wx/wxcrt.h: In function 'size_t wxStrnlen(const wchar_t*, size_t)':
library\wxWidgets-3.0.2\include/wx/wxcrt.h:187:95: error: 'wcsnlen' was not declared in this scope
from library\wxWidgets-3.0.2\include/wx/string.h:4305,
from library\wxWidgets-3.0.2\include/wx/memory.h:15,
from library\wxWidgets-3.0.2\include/wx/object.h:19,
from library\wxWidgets-3.0.2\include/wx/wx.h:15,
from F:\Proj\Main.cpp:1:
library\wxWidgets-3.0.2\include/wx/wxcrt.h: In function 'size_t wxStrnlen(const char*, size_t)':
library\wxWidgets-3.0.2\include/wx/wxcrt.h:173:92: error: 'strnlen' was not declared in this scope
library\wxWidgets-3.0.2\include/wx/wxcrt.h: In function 'size_t wxStrnlen(const wchar_t*, size_t)':
library\wxWidgets-3.0.2\include/wx/wxcrt.h:187:95: error: 'wcsnlen' was not declared in this scope
Вы сделали настройку в первую очередь или используете Makefile напрямую? – Igor
Что это значит? wxWidgets компилируется, я использую его как библиотеку для выполнения связанного с ним проекта cpp. – Kikapi
, поэтому эти ошибки исходят из проекта, а не из самой библиотеки? Какую версию gcc вы используете? Откуда вы его взяли? Вы построили wx с тем же компилятором? Как вы строите проект? – Igor