Сборка unicode,dll Topic is solved

Это русская секция форума wxWidjets. В этой секции вы можете обсуждать любые вопросы, связанные с wxWidgets на вашем родном языке.
Post Reply
SmileGobo
Earned some good credits
Earned some good credits
Posts: 111
Joined: Wed Jul 30, 2008 8:01 am
Location: Russia/MO
Contact:

Сборка unicode,dll

Post by SmileGobo » Fri Oct 23, 2009 6:46 pm

Собирал вот так:

C:\wx\build\msw>mingw32-make -f makefile.gcc SHARED=1 BUILD=release WXUNIV=0 UNICODE=1 USE_ODBC=1 USE_OPENGL=1

Теперь при сборке приложений от линковщика лезет следующая ругань:

Code: Select all

||=== wxDC_TST, Release ===|
||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.obj\Release\wxDC_TSTApp.o:wxDC_TSTApp.cpp:(.text+0x1ab)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\wxDC_TSTApp.o:wxDC_TSTApp.cpp:(.rdata$_ZTV11wxDC_TSTApp[vtable for wxDC_TSTApp]+0x44)||undefined reference to `wxApp::Initialize(int&, char**)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0x5e)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0xb0)||undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0xdf)||undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0x1a9)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0x26a)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0x4d9)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0x59a)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\wxDC_TSTMain.o:wxDC_TSTMain.cpp:(.text+0x8cc)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x308)||undefined reference to `operator+(wxString const&, char)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x331)||undefined reference to `operator+(wxString const&, char const*)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x363)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x49d)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x631)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x657)||undefined reference to `operator+(wxString const&, char)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x680)||undefined reference to `operator+(wxString const&, char const*)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x6b2)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x7ec)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x89c)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0xfa7)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x11f2)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x1218)||undefined reference to `operator+(wxString const&, char)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x1241)||undefined reference to `operator+(wxString const&, char const*)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x1273)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x13ad)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x1541)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, uInfo: resolving wxAppConsole::ms_appInstance        by linking to __imp___ZN12wxAppConsole14ms_appInstanceE (auto-import)|
||Info: resolving wxStringBase::npos       by linking to __imp___ZN12wxStringBase4nposE |
||Info: resolving wxAppConsole::ms_appInitFn        by linking to __imp___ZN12wxAppConsole12ms_appInitFnE |
||Info: resolving _wxEmptyString by linking to __imp__wxEmptyString |
||Info: resolving _wxDefaultPosition by linking to __imp__wxDefaultPosition |
||Info: resolving wxFrame::sm_eventTable       by linking to __imp___ZN7wxFrame13sm_eventTableE |
||Info: resolving vtable for wxwxMenuItemListNodeby linking to __imp___ZTV20wxwxMenuItemListNode |
||Info: resolving _wxFrameNameStr by linking to __imp__wxFrameNameStr |
||Info: resolving vtable for wxFrameby linking to __imp___ZTV7wxFrame |
||Info: resolving _wxDefaultSize by linking to __imp__wxDefaultSize |
||Info: resolving vtable for wxMenuBaseby linking to __imp___ZTV10wxMenuBase |
||Info: resolving vtable for wxListBaseby linking to __imp___ZTV10wxListBase |
||Info: resolving vtable for wxMenuby linking to __imp___ZTV6wxMenu |
||Info: resolving _wxStatusLineNameStr by linking to __imp__wxStatusLineNameStr |
||Info: resolving vtable for wxObjectby linking to __imp___ZTV8wxObject |
||Info: resolving vtable for wxColourby linking to __imp___ZTV8wxColour |
||Info: resolving _wxEVT_CLOSE_WINDOW by linking to __imp__wxEVT_CLOSE_WINDOW |
||Info: resolving _wxEVT_COMMAND_MENU_SELECTED by linking to __imp__wxEVT_COMMAND_MENU_SELECTED |
||Info: resolving _wxEVT_NULL by linking to __imp__wxEVT_NULL |
||Info: resolving _wxEVT_LEFT_DCLICK by linking to __imp__wxEVT_LEFT_DCLICK |
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x1567)||undefined reference to `operator+(wxString const&, char)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x1590)||undefined reference to `operator+(wxString const&, char const*)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x15c2)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x16fc)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x17ac)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
obj\Release\GUIFrame.o:GUIFrame.cpp:(.text+0x2010)||undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'|
||=== Build finished: 33 errors, 1 warnings ===|
win xp sp2; CodeBlocks/mingw/wxWidgets 2.8.9/wxFormBuilder
web-программирование:PHP,js/Ajax

borr_1
Super wx Problem Solver
Super wx Problem Solver
Posts: 362
Joined: Wed Mar 07, 2007 8:10 am
Location: Russia, Shakhty

Post by borr_1 » Sat Oct 24, 2009 5:29 am

Какие либы к проекту подключил, дефиниты какие сделал, исходники в юникодной кодировке?
В defines у проекта стоит WXUSINGDLL и wxUSE_UNICODE

У тебя не стоит MONOLITHIC=1 при сборке. Проверь что у тебя собралось - много dll или одна. Если много то ты не все либы для них к проекту мог подключить.
WinXP SP3, wx-2.8.10, MinGW-4.4.1, gdb-7.1.2, eclipse

SmileGobo
Earned some good credits
Earned some good credits
Posts: 111
Joined: Wed Jul 30, 2008 8:01 am
Location: Russia/MO
Contact:

Post by SmileGobo » Sat Oct 24, 2009 7:28 am

Хидеры:

Code: Select all

#include <wx/menu.h>
#include <wx/dcclient.h>
#include <wx/pen.h>
#include <wx/brush.h>
#include <wx/scrolwin.h>
#include <wx/gdicmn.h>
либы:
Image

А вот эти дефайны WXUSINGDLL и wxUSE_UNICODE где должны быть? Руками их вбивать в одном из файлов проекта или в setup.h?

при сборке MONOLITHIC не указал - файлов много.
кодировку файлов сменил на UTF-8(without bom)
И руками вбил
#define wxUSE_UNICODE 1
#define WXUSINGDLL 1
Пока результат отрицательный
Attachments
1.png
1.png (4.77 KiB) Viewed 2519 times
win xp sp2; CodeBlocks/mingw/wxWidgets 2.8.9/wxFormBuilder
web-программирование:PHP,js/Ajax

borr_1
Super wx Problem Solver
Super wx Problem Solver
Posts: 362
Joined: Wed Mar 07, 2007 8:10 am
Location: Russia, Shakhty

Post by borr_1 » Sat Oct 24, 2009 12:20 pm

Если CodeBlock то
Project->Build Properties->Compiler Settings закладка #defines
В дереве выбери свой проект и там должно быть
__GNUWIN32__
__WXMSW__
WXUSINGDLL
wxUSE_UNICODE

Подключи поочередно все *.a файлы которые у тебя в либ заодно проверь их названия CB иногда ошибается. Пересобери проект
WinXP SP3, wx-2.8.10, MinGW-4.4.1, gdb-7.1.2, eclipse

SmileGobo
Earned some good credits
Earned some good credits
Posts: 111
Joined: Wed Jul 30, 2008 8:01 am
Location: Russia/MO
Contact:

Post by SmileGobo » Sat Oct 24, 2009 4:02 pm

дефайны объявил в настройках все завелось большое спасибо!
win xp sp2; CodeBlocks/mingw/wxWidgets 2.8.9/wxFormBuilder
web-программирование:PHP,js/Ajax

Post Reply