Author Topic: Error when compiling C::B with C::B  (Read 1745 times)

Offline mariusm

  • Multiple posting newcomer
  • *
  • Posts: 46
Error when compiling C::B with C::B
« on: March 03, 2023, 11:30:40 pm »
Seems that C::B can not compile his own source  :'( ;D

C::B 17.12 version with MinGW on windows
Source of C::B 17.12
wxWidgets 2.8 compiled with success by makefile.gcc => wxmsw28u_gcc_custom.dll on ..\wx\lib\gcc_dll

Code
Cleaned "Code::Blocks wx2.8.x - src"
Running target pre-build steps
cmd /c if exist devel\exchndl.dll del devel\exchndl.dll

-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\include\sdk_precomp.h -o .objs\include\sdk_precomp.h.gch
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\include\sdk.h -o .objs\include\sdk.h.gch
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\sdk\configmanager-revision.cpp -o .objs\sdk\configmanager-revision.o
D:\C++\codeblocks-17.12\src\sdk\configmanager-revision.cpp:24:10: warning: 'static wxString ConfigManager::GetRevisionString()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 wxString ConfigManager::GetRevisionString()
          ^
D:\C++\codeblocks-17.12\src\sdk\configmanager-revision.cpp:31:14: warning: 'static unsigned int ConfigManager::GetRevisionNumber()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 unsigned int ConfigManager::GetRevisionNumber()
              ^
D:\C++\codeblocks-17.12\src\sdk\configmanager-revision.cpp:36:10: warning: 'static wxString ConfigManager::GetSvnDate()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 wxString ConfigManager::GetSvnDate()
          ^
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\base\tinyxml\tinystr.cpp -o .objs\base\tinyxml\tinystr.o
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\base\tinyxml\tinyxml.cpp -o .objs\base\tinyxml\tinyxml.o
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\base\tinyxml\tinyxmlerror.cpp -o .objs\base\tinyxml\tinyxmlerror.o
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\base\tinyxml\tinyxmlparser.cpp -o .objs\base\tinyxml\tinyxmlparser.o
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\build_tools\autorevision\autorevision.cpp -o .objs\build_tools\autorevision\autorevision.o
g++.exe -std=gnu++11 -Wno-unused-local-typedefs -Wno-deprecated-declarations -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -Iinclude\tinyxml -ID:\C++\codeblocks-17.12\wx\include -ID:\C++\codeblocks-17.12\wx\\lib\gcc_dll\mswu -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -ID:\KITURI\Editor_CPP\SDK\MinGW\include -c D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp -o .objs\sdk\annoyingdialog.o
In file included from D:\C++\codeblocks-17.12\wx\include/wx/window.h:19:0,
                 from D:\C++\codeblocks-17.12\wx\include/wx/control.h:23,
                 from D:\C++\codeblocks-17.12\wx\include/wx/button.h:46,
                 from D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:12:
D:\C++\codeblocks-17.12\wx\include/wx/event.h:2721:34: warning: 'AnnoyingDialog::sm_eventTable' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
     const wxEventTable theClass::sm_eventTable = \
                                  ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
 ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:19: warning: 'virtual const wxEventTable* AnnoyingDialog::GetEventTable() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
                   ^
D:\C++\codeblocks-17.12\wx\include/wx/event.h:2723:25: note: in definition of macro 'BEGIN_EVENT_TABLE'
     const wxEventTable *theClass::GetEventTable() const \
                         ^
D:\C++\codeblocks-17.12\wx\include/wx/event.h:2725:73: warning: 'AnnoyingDialog::sm_eventHashTable' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
     wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
                                                                         ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
 ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:19: warning: 'virtual wxEventHashTable& AnnoyingDialog::GetEventHashTable() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
                   ^
D:\C++\codeblocks-17.12\wx\include/wx/event.h:2726:23: note: in definition of macro 'BEGIN_EVENT_TABLE'
     wxEventHashTable &theClass::GetEventHashTable() const \
                       ^
D:\C++\codeblocks-17.12\wx\include/wx/event.h:2728:60: warning: 'AnnoyingDialog::sm_eventTableEntries' redeclared without dllimport attribute after being referenced with dll linkage
     const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
                                                            ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:1: note: in expansion of macro 'BEGIN_EVENT_TABLE'
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
 ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:30:1: warning: 'AnnoyingDialog::AnnoyingDialog(const wxString&, const wxString&, wxArtID, AnnoyingDialog::dStyle, AnnoyingDialog::dReturnType, const wxString&, const wxString&, const wxString&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 AnnoyingDialog::AnnoyingDialog(const wxString& caption, const wxString& message, const wxArtID icon,
 ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:39:1: warning: 'AnnoyingDialog::AnnoyingDialog(const wxString&, const wxString&, const wxString&, wxArtID, AnnoyingDialog::dStyle, AnnoyingDialog::dReturnType, const wxString&, const wxString&, const wxString&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 AnnoyingDialog::AnnoyingDialog(const wxString& caption, const wxString &id, const wxString& message,
 ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:48:6: warning: 'void AnnoyingDialog::Init(const wxString&, const wxString&, const wxString&, wxArtID, AnnoyingDialog::dStyle, const wxString&, const wxString&, const wxString&)' redeclared without dllimport attribute after being referenced with dll linkage
 void AnnoyingDialog::Init(const wxString &caption, const wxString &id, const wxString& message, const wxArtID icon,
      ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:225:6: warning: 'void AnnoyingDialog::OnButton(wxCommandEvent&)' redeclared without dllimport attribute after being referenced with dll linkage
 void AnnoyingDialog::OnButton(wxCommandEvent& event)
      ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:261:5: warning: 'virtual int AnnoyingDialog::ShowModal()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 int AnnoyingDialog::ShowModal()
     ^
In file included from D:\C++\codeblocks-17.12\wx\include/wx/window.h:19:0,
                 from D:\C++\codeblocks-17.12\wx\include/wx/control.h:23,
                 from D:\C++\codeblocks-17.12\wx\include/wx/button.h:46,
                 from D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:12:
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:19: error: definition of static data member 'AnnoyingDialog::sm_eventTable' of dllimport'd class
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)
                   ^
D:\C++\codeblocks-17.12\wx\include/wx/event.h:2721:24: note: in definition of macro 'BEGIN_EVENT_TABLE'
     const wxEventTable theClass::sm_eventTable = \
                        ^
D:\C++\codeblocks-17.12\src\sdk\annoyingdialog.cpp:26:19: error: definition of static data member 'AnnoyingDialog::sm_eventHashTable' of dllimport'd class
 BEGIN_EVENT_TABLE(AnnoyingDialog, wxScrollingDialog)

Offline mariusm

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: Error when compiling C::B with C::B
« Reply #1 on: March 04, 2023, 09:56:16 am »
I made another step but now I get errors from the linker:

Code
g++.exe -shared  -Wl,--out-implib=devel\libwxpropgrid.a -Wl,--dll -Lbase\tinyxml -LD:\C++\codeblocks-17.12\wx\lib\gcc_dll -LD:\KITURI\Editor_CPP\SDK\MinGW\lib .objs\sdk\wxpropgrid\src\advprops.o .objs\sdk\wxpropgrid\src\editors.o .objs\sdk\wxpropgrid\src\extras.o .objs\sdk\wxpropgrid\src\manager.o .objs\sdk\wxpropgrid\src\odcombo.o .objs\sdk\wxpropgrid\src\propgrid.o .objs\sdk\wxpropgrid\src\props.o .objs\sdk\wxpropgrid\src\xh_propgrid.o  -o devel\wxpropgrid.dll -Wl,--enable-auto-image-base -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined  -lwxmsw28u
.objs\sdk\wxpropgrid\src\advprops.o:advprops.cpp:(.text+0x4654): undefined reference to `wxString::Format(char const*, ...)'
.objs\sdk\wxpropgrid\src\advprops.o:advprops.cpp:(.text+0x5473): undefined reference to `wxString::Find(char const*) const'
.objs\sdk\wxpropgrid\src\advprops.o:advprops.cpp:(.text+0x8fbb): undefined reference to `wxDateTime::ParseFormat(char const*, char const*, wxDateTime const&)'
.objs\sdk\wxpropgrid\src\advprops.o:advprops.cpp:(.text+0x9158): undefined reference to `wxDateTime::Format(char const*, wxDateTime::TimeZone const&) const'
.objs\sdk\wxpropgrid\src\advprops.o:advprops.cpp:(.text+0x9212): undefined reference to `wxDateTime::ParseFormat(char const*, char const*, wxDateTime const&)'
.objs\sdk\wxpropgrid\src\advprops.o:advprops.cpp:(.text+0x9248): undefined reference to `wxDateTime::Format(char const*, wxDateTime::TimeZone const&) const'
D:/KITURI/Editor_CPP/SDK/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: .objs\sdk\wxpropgrid\src\advprops.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status

I searched after wxDateTime::ParseFormat and exists in the library.
« Last Edit: March 04, 2023, 10:02:45 am by mariusm »