Author Topic: Build C::B against wx3.02 with gcc 5.2 under Windows  (Read 85191 times)

Offline mageia

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #105 on: November 08, 2015, 09:44:43 am »
it is awesome then only denpend on codeblocks.dll,i can't build 10561,link error about wx_MSLU_stat(?)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #106 on: November 08, 2015, 12:16:05 pm »
it is awesome then only denpend on codeblocks.dll,i can't build 10561,link error about wx_MSLU_stat(?)
Please give use details about your problem.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #107 on: November 08, 2015, 12:29:25 pm »
...
Any one know how to remove such warning?
...
You have to add a using directive for the function in the parent class. If our function does something special and using the original function is not a good idea you can put the using directive in the private/protected section.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #108 on: November 09, 2015, 06:11:55 am »
Under Windows, all the static libraries are build with all symbol exported(Note this option is enabled by default), and later those symbols were exported through codeblocks.dll(the sdk target). That's the current way we have used for many years.
I have said that before in this thread. Those kinds of static libraries are quite similar as shared libraries. And you will see that all the plugins are only need to link the the codeblocks.dll, and they don't need static to link to tinyxml like libraries.
My change on those static libraries is that I use explicitly symbol export, which means all the symbols needed to export from the codeblocks.dll is need to be decorated as "__declspec(dllexport)", This reduce the export table of the codeblocks.dll, and make resolution of the symbols a bit faster.
Yes, I know and I say this is the wrong way to do it.
All these libs have not been designed to be shared libraries.
If they are we should just build them as such and don't bother with all this trickery.

Also on linux using the default visibility can cause lots of problems and strange crashes.
As you suggested, we need to build them as static libraries, and we need to link them as static libraries. A lot of targets need those static libraries, for example, if some plugin need to access the configure file, then we need to link to the static version of the tinyxml library.
Am I right?
If we see this is the correct direction, I may take some time to test it.
OK.
I have done the patches, which let some plugins link to the static library. So the symbols in those static libraries are not exported from the codeblocks.dll, see the patches here: Link
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline mageia

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #109 on: November 09, 2015, 07:55:56 am »
it is awesome then only denpend on codeblocks.dll,i can't build 10561,link error about wx_MSLU_stat(?)
Please give use details about your problem.
thanks reply,and here is
Quote
C:\localusr\wxWidgets\include\wx\filefn.h|522|undefined reference to `wxMSLU__wstat(wchar_t const*, _stat64*)'|
||error: ld returned 1 exit status|
MSLU ,wx use it on win9.x not later,isn't it,error happen when link codeblocks.dll,and i use nuwen's mingw64 to build wx3.02 and codeblocks 10561,enough information or not?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #110 on: November 09, 2015, 08:24:54 am »
Quote
C:\localusr\wxWidgets\include\wx\filefn.h|522|undefined reference to `wxMSLU__wstat(wchar_t const*, _stat64*)'|
||error: ld returned 1 exit status|
MSLU ,wx use it on win9.x not later,isn't it,error happen when link codeblocks.dll,and i use nuwen's mingw64 to build wx3.02 and codeblocks 10561,enough information or not?
Show us the full build log please. See:FAQ-Compiling (errors) - CodeBlocks
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #111 on: November 11, 2015, 03:33:31 pm »
...
OK.
I have done the patches, which let some plugins link to the static library. So the symbols in those static libraries are not exported from the codeblocks.dll, see the patches here: Link
I see a crash here with the above patches:
Code
[debug]> bt 30
[debug]#0  0x004c2f21 in sq_getprintfunc (v=0x0) at F:\cb_sf_git\trunk\src\sdk\scripting\squirrel\sqapi.cpp:1256
[debug]#1  0x0049e1cc in ScriptConsole::ScriptConsole (this=0x74587d8, parent=0x5a0bd00, id=-1) at F:\cb_sf_git\trunk\src\src\scriptconsole.cpp:116
[debug]#2  0x00451844 in MainFrame::CreateIDE (this=0x5a0bd00) at F:\cb_sf_git\trunk\src\src\main.cpp:756
[debug]#3  0x0044f847 in MainFrame::MainFrame (this=0x5a0bd00, parent=0x0) at F:\cb_sf_git\trunk\src\src\main.cpp:602
[debug]#4  0x00402a56 in CodeBlocksApp::InitFrame (this=0x587d4c0) at F:\cb_sf_git\trunk\src\src\app.cpp:489
[debug]#5  0x0040407b in CodeBlocksApp::OnInit (this=0x587d4c0) at F:\cb_sf_git\trunk\src\src\app.cpp:697
[debug]#6  0x004fb06e in wxAppConsoleBase::CallOnInit (this=0x587d4c0) at D:\wx3\include\wx\app.h:93
[debug]#7  0x6a00fbf0 in wxEntryReal (argc=@0x6abe53f8: 9, argv=0x587d150) at D:\wx3\src\common\init.cpp:479
[debug]#8  0x6a094b98 in wxEntry (argc=@0x6abe53f8: 9, argv=0x587d150) at D:\wx3\src\msw\main.cpp:197
[debug]#9  0x6a094e86 in wxEntry (hInstance=0x400000, nCmdShow=10) at D:\wx3\src\msw\main.cpp:415
[debug]#10 0x0040224d in WinMain@16 (hInstance=0x400000, hPrevInstance=0x0, nCmdShow=10) at F:\cb_sf_git\trunk\src\src\app.cpp:322
[debug]#11 0x0052ac9d in main ()
[debug]>>>>>>cb_gdb:

Here:
Code
ScriptConsole::ScriptConsole(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(ScriptConsole)
    wxBoxSizer* BoxSizer2;
    wxBoxSizer* BoxSizer1;

    Create(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("id"));
    BoxSizer1 = new wxBoxSizer(wxVERTICAL);
    txtConsole = new wxTextCtrl(this, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL, wxDefaultValidator, _T("ID_TEXTCTRL1"));
    wxFont txtConsoleFont(10,wxFONTFAMILY_MODERN,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
    txtConsole->SetFont(txtConsoleFont);
    BoxSizer1->Add(txtConsole, 1, wxALL|wxEXPAND, 0);
    Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
    Panel1->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
    BoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
    lblCommand = new wxStaticText(Panel1, ID_STATICTEXT1, _("Command:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
    BoxSizer2->Add(lblCommand, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    txtCommand = new wxComboBox(Panel1, ID_COMBOBOX1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, 0, wxCB_DROPDOWN|wxTE_PROCESS_ENTER, wxDefaultValidator, _T("ID_COMBOBOX1"));
    wxFont txtCommandFont(10,wxFONTFAMILY_MODERN,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
    txtCommand->SetFont(txtCommandFont);
    BoxSizer2->Add(txtCommand, 1, wxALL|wxALIGN_CENTER_VERTICAL, 0);
    btnExecute = new wxBitmapButton(Panel1, ID_BITMAPBUTTON1, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_EXECUTABLE_FILE")),wxART_BUTTON), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON1"));
    btnExecute->SetToolTip(_("Execute current command"));
    BoxSizer2->Add(btnExecute, 0, wxALIGN_CENTER_VERTICAL, 5);
    btnLoad = new wxBitmapButton(Panel1, ID_BITMAPBUTTON2, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_FILE_OPEN")),wxART_BUTTON), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON2"));
    btnLoad->SetDefault();
    btnLoad->SetToolTip(_("Load from file"));
    BoxSizer2->Add(btnLoad, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
    btnClear = new wxBitmapButton(Panel1, ID_BITMAPBUTTON3, wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(_T("wxART_DELETE")),wxART_BUTTON), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW, wxDefaultValidator, _T("ID_BITMAPBUTTON3"));
    btnClear->SetDefault();
    btnClear->SetToolTip(_("Clear output window"));
    BoxSizer2->Add(btnClear, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0);
    Panel1->SetSizer(BoxSizer2);
    BoxSizer2->Fit(Panel1);
    BoxSizer2->SetSizeHints(Panel1);
    BoxSizer1->Add(Panel1, 0, wxALL|wxEXPAND, 0);
    SetSizer(BoxSizer1);
    BoxSizer1->Fit(this);
    BoxSizer1->SetSizeHints(this);

    Connect(ID_COMBOBOX1,wxEVT_COMMAND_TEXT_ENTER,(wxObjectEventFunction)&ScriptConsole::OnbtnExecuteClick);
    Connect(ID_BITMAPBUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ScriptConsole::OnbtnExecuteClick);
    Connect(ID_BITMAPBUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ScriptConsole::OnbtnLoadClick);
    Connect(ID_BITMAPBUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&ScriptConsole::OnbtnClearClick);
    //*)

    txtCommand->Append(wxEmptyString);
    if (!s_Console)
    {
        s_Console = this;
        s_OldPrintFunc = sq_getprintfunc(SquirrelVM::GetVMPtr());
        sq_setprintfunc(SquirrelVM::GetVMPtr(), ScriptConsolePrintFunc);
    }

    Log(_("Welcome to the script console!"));
}

I see that SquirrelVM::GetVMPtr() is 0 here.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #112 on: November 11, 2015, 04:11:42 pm »
...
I see that SquirrelVM::GetVMPtr() is 0 here.
I debugged for a while, and I found that the SquirrelVM::_VM is a static variable of the class.
Code
class SquirrelVM
{
friend class SquirrelObject;
friend struct SquirrelError;
public:
    // C::B patch: Add additional initilisation flags
static void Init(SquirrelInitFlags flags = sqifAll);
static BOOL_T IsInitialized(){return _VM == NULL?FALSE:TRUE;}
static void Shutdown();
static void Cleanup();
static BOOL_T Update(); //debugger and maybe GC later
static SquirrelObject CompileScript(const SQChar *s);
static SquirrelObject CompileBuffer(const SQChar *s,const SQChar * debugInfo=sqT("console_buffer"));
static SquirrelObject RunScript(const SquirrelObject &o,SquirrelObject *_this = NULL);
static void PrintFunc(HSQUIRRELVM v,const SQChar* s,...);
static BOOL_T BeginCall(const SquirrelObject &func);
static BOOL_T BeginCall(const SquirrelObject &func,SquirrelObject &_this);
static void PushParam(const SquirrelObject &o);
static void PushParam(const SQChar *s);
static void PushParam(SQInteger n);
static void PushParam(SQFloat f);
static void PushParam(SQUserPointer up);
static void PushParamNull();
static SquirrelObject EndCall();
static SquirrelObject CreateString(const SQChar *s);
static SquirrelObject CreateTable();
static SquirrelObject CreateArray(SQInteger size);
static SquirrelObject CreateInstance(SquirrelObject &oclass); // oclass is an existing class. Create an 'instance' (OT_INSTANCE) of oclass.
static SquirrelObject CreateFunction(SQFUNCTION func);
  static SquirrelObject CreateUserData(SQInteger size);

static const SquirrelObject &GetRootTable();
static HSQUIRRELVM GetVMPtr() { return _VM; }

#if 0
  static void SetVMPtr(HSQUIRRELVM v) {
    _VM = v;
  } // setVMPtr
#endif

  static void GetVMSys(SquirrelVMSys & vmSys) {
    vmSys._VM   = _VM;
    vmSys._root = _root;
  } // GetVMSys

  static void SetVMSys(const SquirrelVMSys & vmSys) {
    _VM   = vmSys._VM;
    _root = vmSys._root;
  } // SetVMSys

  static void PushValue(INT_T val) {
    sq_pushinteger(_VM,val);
  } // PushValue
  static void PushValue(FLOAT_T val) {
    sq_pushfloat(_VM,val);
  } // PushValue
  static void PushValue(bool val) { // Compiler treats SQBool as INT_T.
    sq_pushbool(_VM,val);
  } // PushValue
  static void PushValue(SQChar * val) {
    sq_pushstring(_VM,val,-1);
  } // PushValue
  static void PushValue(SQUserPointer val) {
    sq_pushuserpointer(_VM,val);
  } // PushValue
  static void PushValue(const SQChar * val) {
    sq_pushstring(_VM,val,-1);
  } // PushValue
  static void PushObject(SquirrelObject & so) {
    sq_pushobject(_VM,so._o);
  } // PushObject
  static void Pop(SQInteger nelemstopop) {
    sq_pop(_VM,nelemstopop);
  } // Pop
  static void PushRootTable(void);
  // Create/bind a function on the table currently on the stack.
  static SquirrelObject CreateFunction(SQFUNCTION func,const SQChar * scriptFuncName,const SQChar * typeMask=0);
  // Create/bind a function on the table so. typeMask: standard Squirrel types plus: no typemask means no args, "*" means any type of args.
  static SquirrelObject CreateFunction(SquirrelObject & so,SQFUNCTION func,const SQChar * scriptFuncName,const SQChar * typeMask=0);
  // Create/bind a function to the root table. typeMask: standard Squirrel types plus: no typemask means no args, "*" means any type of args.
  static SquirrelObject CreateFunctionGlobal(SQFUNCTION func,const SQChar * scriptFuncName,const SQChar * typeMask=0);

private:
static HSQUIRRELVM _VM;
static SQInteger _CallState;
static SquirrelObject * _root;
};
I see two instance of the SquirrelVM::_VM exists. The first one is initialized inside the sdk target, and the other instance is inside the src target. It looks like the first one get initialized correctly, but the second one is not, so the second one's value is 0, and we get a crash. Is it by design of the compiler? I mean this time, SquirrelVM library is a static library, and its source are copied to both sdk and src...

So, I think we still need the "old" way, I mean that we should have only one instance of the SquirrelVM::_VM, and we need to export the symbols from the sdk.

EDIT:
Is the issue mentioned here: c++ - Initializing private static members - Stack Overflow, each cpp include the class will have a copy of the static member variable?
« Last Edit: November 11, 2015, 04:17:25 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #113 on: November 12, 2015, 12:52:43 am »
...
I see two instance of the SquirrelVM::_VM exists. The first one is initialized inside the sdk target, and the other instance is inside the src target. It looks like the first one get initialized correctly, but the second one is not, so the second one's value is 0, and we get a crash. Is it by design of the compiler? I mean this time, SquirrelVM library is a static library, and its source are copied to both sdk and src...

So, I think we still need the "old" way, I mean that we should have only one instance of the SquirrelVM::_VM, and we need to export the symbols from the sdk.

EDIT:
Is the issue mentioned here: c++ - Initializing private static members - Stack Overflow, each cpp include the class will have a copy of the static member variable?
OK, this is the actual issue to my problem: c++ - Using static members across Static Lib and DLL - member value is resetting - Stack Overflow, the static lib which contains some static member should only be linked to one dll.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline mageia

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #114 on: November 12, 2015, 06:10:14 am »
Quote
C:\localusr\wxWidgets\include\wx\filefn.h|522|undefined reference to `wxMSLU__wstat(wchar_t const*, _stat64*)'|
||error: ld returned 1 exit status|
MSLU ,wx use it on win9.x not later,isn't it,error happen when link codeblocks.dll,and i use nuwen's mingw64 to build wx3.02 and codeblocks 10561,enough information or not?
Show us the full build log please. See:FAQ-Compiling (errors) - CodeBlocks
sorry,here it is.it is huge,so i post a 7z file

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #115 on: November 12, 2015, 06:33:06 am »
Code
g++.exe -Wall -g -pipe -mthreads -m64 -fno-keep-inline-dllexport -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DNOPCH -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -std=c++11 -IC:\localusr\wxWidgets\include -IC:\localusr\wxWidgets\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -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 -c E:\Devel\Codeblocks\trunk\src\sdk\xtra_res.cpp -o .objs30_64\sdk\xtra_res.o
                 from E:\Devel\Codeblocks\trunk\src\sdk\searchresultslog.cpp:15:
C:\localusr\wxWidgets\include/wx/window.h:1872:13: note: declared here
 inline void wxWindowBase::SetInitialBestSize(const wxSize& size)
             ^
g++.exe -shared  -Wl,--out-implib=devel30_64\libcodeblocks.a -Wl,--dll -Lbase\tinyxml -LC:\localusr\wxWidgets\lib\gcc_dll -Ldevel30_64 -Lsdk\scripting\lib .objs30_64\sdk\configmanager-revision.o .objs30_64\base\tinyxml\tinywxuni.o .objs30_64\sdk\annoyingdialog.o .objs30_64\sdk\autodetectcompilers.o .objs30_64\sdk\base64.o .objs30_64\sdk\blockallocated.o .objs30_64\sdk\cbauibook.o .objs30_64\sdk\cbcolourmanager.o .objs30_64\sdk\cbdebugger_interfaces.o .objs30_64\sdk\cbeditor.o .objs30_64\sdk\cbeditorprintout.o .objs30_64\sdk\cbexception.o .objs30_64\sdk\cbplugin.o .objs30_64\sdk\cbproject.o .objs30_64\sdk\cbstatusbar.o .objs30_64\sdk\cbstyledtextctrl.o .objs30_64\sdk\cbthreadpool.o .objs30_64\sdk\cbtreectrl.o .objs30_64\sdk\cbworkspace.o .objs30_64\sdk\ccmanager.o .objs30_64\sdk\compileoptionsbase.o .objs30_64\sdk\compiler.o .objs30_64\sdk\compilercommandgenerator.o .objs30_64\sdk\compilerfactory.o .objs30_64\sdk\compileroptions.o .objs30_64\sdk\compiletargetbase.o .objs30_64\sdk\configmanager.o .objs30_64\sdk\configurationpanel.o .objs30_64\sdk\configuretoolsdlg.o .objs30_64\sdk\confirmreplacedlg.o .objs30_64\sdk\crc32.o .objs30_64\sdk\debuggermanager.o .objs30_64\sdk\editarrayfiledlg.o .objs30_64\sdk\editarrayorderdlg.o .objs30_64\sdk\editarraystringdlg.o .objs30_64\sdk\editor_hooks.o .objs30_64\sdk\editorbase.o .objs30_64\sdk\editorcolourset.o .objs30_64\sdk\editorlexerloader.o .objs30_64\sdk\editormanager.o .objs30_64\sdk\editpairdlg.o .objs30_64\sdk\editpathdlg.o .objs30_64\sdk\edittooldlg.o .objs30_64\sdk\encodingdetector.o .objs30_64\sdk\externaldepsdlg.o .objs30_64\sdk\filefilters.o .objs30_64\sdk\filegroupsandmasks.o .objs30_64\sdk\filemanager.o .objs30_64\sdk\findreplacedlg.o .objs30_64\sdk\genericmultilinenotesdlg.o .objs30_64\sdk\globals.o .objs30_64\sdk\importers_globals.o .objs30_64\sdk\incrementalselectlistdlg.o .objs30_64\sdk\infowindow.o .objs30_64\sdk\loggers.o .objs30_64\sdk\logmanager.o .objs30_64\sdk\macrosmanager.o .objs30_64\sdk\managedthread.o .objs30_64\sdk\manager.o .objs30_64\sdk\menuitemsmanager.o .objs30_64\sdk\mozilla_chardet\src\CharDistribution.o .objs30_64\sdk\mozilla_chardet\src\JpCntx.o .objs30_64\sdk\mozilla_chardet\src\LangBulgarianModel.o .objs30_64\sdk\mozilla_chardet\src\LangCyrillicModel.o .objs30_64\sdk\mozilla_chardet\src\LangGreekModel.o .objs30_64\sdk\mozilla_chardet\src\LangHebrewModel.o .objs30_64\sdk\mozilla_chardet\src\LangHungarianModel.o .objs30_64\sdk\mozilla_chardet\src\LangThaiModel.o .objs30_64\sdk\mozilla_chardet\src\nsBig5Prober.o .objs30_64\sdk\mozilla_chardet\src\nsCharSetProber.o .objs30_64\sdk\mozilla_chardet\src\nsEscCharsetProber.o .objs30_64\sdk\mozilla_chardet\src\nsEscSM.o .objs30_64\sdk\mozilla_chardet\src\nsEUCJPProber.o .objs30_64\sdk\mozilla_chardet\src\nsEUCKRProber.o .objs30_64\sdk\mozilla_chardet\src\nsEUCTWProber.o .objs30_64\sdk\mozilla_chardet\src\nsGB2312Prober.o .objs30_64\sdk\mozilla_chardet\src\nsHebrewProber.o .objs30_64\sdk\mozilla_chardet\src\nsLatin1Prober.o .objs30_64\sdk\mozilla_chardet\src\nsMBCSGroupProber.o .objs30_64\sdk\mozilla_chardet\src\nsMBCSSM.o .objs30_64\sdk\mozilla_chardet\src\nsSBCharSetProber.o .objs30_64\sdk\mozilla_chardet\src\nsSBCSGroupProber.o .objs30_64\sdk\mozilla_chardet\src\nsSJISProber.o .objs30_64\sdk\mozilla_chardet\src\nsUniversalDetector.o .objs30_64\sdk\mozilla_chardet\src\nsUTF8Prober.o .objs30_64\sdk\multiselectdlg.o .objs30_64\sdk\newfromtemplatedlg.o .objs30_64\sdk\personalitymanager.o .objs30_64\sdk\pipedprocess.o .objs30_64\sdk\pluginmanager.o .objs30_64\sdk\pluginsconfigurationdlg.o .objs30_64\sdk\printing_types.o .objs30_64\sdk\projectbuildtarget.o .objs30_64\sdk\projectfile.o .objs30_64\sdk\projectfileoptionsdlg.o .objs30_64\sdk\projectlayoutloader.o .objs30_64\sdk\projectloader.o .objs30_64\sdk\projectloader_hooks.o .objs30_64\sdk\projectmanager.o .objs30_64\sdk\projectsfilemasksdlg.o .objs30_64\sdk\projecttemplateloader.o .objs30_64\sdk\scripting\bindings\sc_consts.o .objs30_64\sdk\scripting\bindings\sc_dialog.o .objs30_64\sdk\scripting\bindings\sc_globals.o .objs30_64\sdk\scripting\bindings\sc_io.o .objs30_64\sdk\scripting\bindings\sc_plugin.o .objs30_64\sdk\scripting\bindings\sc_progress.o .objs30_64\sdk\scripting\bindings\sc_util_dialogs.o .objs30_64\sdk\scripting\bindings\sc_wxtypes.o .objs30_64\sdk\scripting\bindings\scriptbindings.o .objs30_64\sdk\scriptingmanager.o .objs30_64\sdk\scriptsecuritywarningdlg.o .objs30_64\sdk\scrollingdialog.o .objs30_64\sdk\sdk_events.o .objs30_64\sdk\searchresultslog.o .objs30_64\sdk\selecttargetdlg.o .objs30_64\sdk\templatemanager.o .objs30_64\sdk\toolsmanager.o .objs30_64\sdk\uservarmanager.o .objs30_64\sdk\workspaceloader.o .objs30_64\sdk\xtra_res.o  -o devel30_64\codeblocks.dll -Wl,--enable-auto-image-base -Wl,--export-all-symbols -Wl,--add-stdcall-alias -Wl,--enable-auto-import -Wl,--no-undefined  -lshfolder -ltxml30_64 -lwxscintilla_cb -lsqplus30_64 -lsqstdlib30_64 -lsquirrel30_64 -lgdi32 -lwxmsw30u

Likely error caused by this option; -std=c++11! Windows and wxWidgets 3.0 needs some GNU compiler options to work.

Edit: I used the option of defining "HAVE_TR1_TYPE_TRAITS"; but, the normal way is to use gnu++11 instead of c++11 as the standard.
Edit2: If using an MinGW64 GCC; I would try the defining of HAVE_TR1_TYPE_TRAITS. But, I am NOT sure what version of MinGW64 GCC supported what that defines means; I am using MSys2 MinGW64 GCC 5.2.0 and defining HAVE_TR1_TYPE_TRAITS while building wxWidgets and Code::Blocks gets read of the error.

Tim S.
« Last Edit: November 12, 2015, 06:48:26 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #116 on: November 12, 2015, 06:38:50 am »
Quote
C:\localusr\wxWidgets\include\wx\filefn.h|522|undefined reference to `wxMSLU__wstat(wchar_t const*, _stat64*)'|
||error: ld returned 1 exit status|
MSLU ,wx use it on win9.x not later,isn't it,error happen when link codeblocks.dll,and i use nuwen's mingw64 to build wx3.02 and codeblocks 10561,enough information or not?
Show us the full build log please. See:FAQ-Compiling (errors) - CodeBlocks
sorry,here it is.it is huge,so i post a 7z file
Hi, I see this log file, and I don't see something is wrong from the log file.
But it has reported before in our forum:
Build C::B linker error: undefined reference to`wxMSLU__wstat(wchar_t const*,..., either a compiler issue or wx build option issue.
Also, I see some similar page which is in Japaneses state the issue, see:
wxWidgets-2.9.5 msw - なんとな~くしあわせ?の日記, you may need to translate to English language by some web service.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #117 on: November 19, 2015, 08:05:02 pm »
Just found the cause of a two wxWidgets Debug Alert I have been getting for a few days.

Code
../../src/common/filefn.cpp(253): assert "!fn.IsDir()" failed in FindValidPath(): Cannot search for directories; only for files

Code
../../src/common/arrstr.cpp(395): assert "iIndex != (-1)" failed in Remove(): removing inexistent element in wxArrayString::Remove

I was having a random issue with Using the CygWin compiler when the GCC compiler was the default compiler.
So, I changed the "default compiler" to "No Compiler", the random issue went away.
But, it cause the two messages above when starting my self built Code::Blocks using MinGW64 32bit GCC 5.2 and wx3.0.2

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #118 on: November 23, 2015, 02:18:44 am »
Can you post backtraces?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mageia

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Build C::B against wx3.02 with gcc 5.2 under Windows
« Reply #119 on: November 26, 2015, 09:25:46 am »
Quote
C:\localusr\wxWidgets\include\wx\filefn.h|522|undefined reference to `wxMSLU__wstat(wchar_t const*, _stat64*)'|
||error: ld returned 1 exit status|
MSLU ,wx use it on win9.x not later,isn't it,error happen when link codeblocks.dll,and i use nuwen's mingw64 to build wx3.02 and codeblocks 10561,enough information or not?
Show us the full build log please. See:FAQ-Compiling (errors) - CodeBlocks
sorry,here it is.it is huge,so i post a 7z file
Hi, I see this log file, and I don't see something is wrong from the log file.
But it has reported before in our forum:
Build C::B linker error: undefined reference to`wxMSLU__wstat(wchar_t const*,..., either a compiler issue or wx build option issue.
Also, I see some similar page which is in Japaneses state the issue, see:
wxWidgets-2.9.5 msw - なんとな~くしあわせ?の日記, you may need to translate to English language by some web service.
thx ,i take a look and try later!