Search found 48 matches

by Rob'
Wed May 15, 2019 12:06 pm
Forum: C++ Development
Topic: wxTextFile BOM
Replies: 1
Views: 37

wxTextFile BOM

Hello, I'm using wxTextFile to read a file that contains the BOM for UTF8-encoding at the beginning of the file. After the work is done I write back the data to a new file. The new file should also contain the BOM. What I have to do to achieve that? Have I to do that manually? With wxTextFile::Write...
by Rob'
Fri Jan 11, 2019 10:20 am
Forum: Compiler / Linking / IDE Related
Topic: "Missing binary operator..." in winundef.h
Replies: 1
Views: 116

"Missing binary operator..." in winundef.h

I get a preprocessor error in winundef.h:

Code: Select all

winundef.h	258	error: missing binary operator before token "("
Line 258:

Code: Select all

 #if !wxCHECK_W32API_VERSION( 0, 5 )
I'm using wx 3.0.

What can be the reason?

Thanks in advance
Rob'
by Rob'
Fri Dec 15, 2017 11:11 am
Forum: C++ Development
Topic: Format specifier for (wxString() << x)
Replies: 4
Views: 459

Re: Format specifier for (wxString() << x)

I'm using this macro for integer as well for floating point variables w/o to notice the type. In this case I have an integer variable. For small values I get the string in decimal notation as desired, whereas for large integer values it appears in scientific notation. Is it possible to get the decim...
by Rob'
Sun Nov 05, 2017 4:39 pm
Forum: C++ Development
Topic: Format specifier for (wxString() << x)
Replies: 4
Views: 459

Format specifier for (wxString() << x)

I'm using this simple macro to convert a number to it's string representation:

Code: Select all

#define AS_STRING(x) (wxString() << x)
Is it possible to specify a format? I want to prevent the scientific notification in the resulting string.

Thanks in advance.
Rob'
by Rob'
Sun Oct 15, 2017 3:30 pm
Forum: Compiler / Linking / IDE Related
Topic: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo
Replies: 9
Views: 1201

Re: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo

It is not so easy, because gsErrPropsEditor is part of a library that I use for my projects. Thanks so far, I will get back here.

Rob'
by Rob'
Sun Oct 15, 2017 2:19 pm
Forum: Compiler / Linking / IDE Related
Topic: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo
Replies: 9
Views: 1201

Re: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo

I have added the wxIMPLEMENT_DYNAMIC_CLASS macro and get now the following error: C:\dev\wxWidgets3.1\include\wx\rtti.h|153|error: 'wxClassInfo gsErrPropsEditor::ms_classInfo' is not a static data member of 'class gsErrPropsEditor'| That confirms my suspect, but the question remains: Why not? What f...
by Rob'
Sun Oct 15, 2017 1:38 pm
Forum: Compiler / Linking / IDE Related
Topic: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo
Replies: 9
Views: 1201

Re: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo

I found some using of wxObject::ms_classInfo in the source, but any declaration (wether in WX 3.0 nor in WX 3.1). Where/how is it declared?
by Rob'
Sat Oct 14, 2017 2:30 pm
Forum: Compiler / Linking / IDE Related
Topic: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo
Replies: 9
Views: 1201

Re: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo

This is a part from the header file, it contain some more class deklarations: #include <wx/string.h> #include <vector> #include <wx/arrstr.h> #include <wx/grid.h> #include "errwindowbase.h" ... class gsErrPropsEditor : public wxGridCellEditor { public: gsErrPropsEditor(gsErrProps* errprops); virtual...
by Rob'
Fri Oct 13, 2017 4:55 pm
Forum: Compiler / Linking / IDE Related
Topic: undefined reference to wxGridCellEditorEvtHandler::ms_classInfo
Replies: 9
Views: 1201

undefined reference to wxGridCellEditorEvtHandler::ms_classInfo

I have a class derived from wxGridCellEditor with an overloaded BeginEdit() method. In this method I added one line, the rest is the same as in the base class. void gsErrPropsEditor::BeginEdit(int row, int col, wxGrid* grid) { wxASSERT_MSG(m_control, wxT("The wxGridCellEditor must be created first!"...
by Rob'
Sat Aug 26, 2017 6:28 am
Forum: C++ Development
Topic: wxRegEx question
Replies: 5
Views: 628

Re: wxRegEx question

wxRE_ADVANCED solved the problem.

Thank you!
by Rob'
Fri Aug 25, 2017 8:56 pm
Forum: C++ Development
Topic: wxRegEx question
Replies: 5
Views: 628

Re: wxRegEx question

\s*\S+\s*=\s*\d+
Did you tried that? It also doesn't match. Independently, my version works with all tools. Why not with wx?
Also if you are compiling with C++11 you can try using C++ regex standard classes.
I'm using wx 3.0 and gcc 4.8
by Rob'
Fri Aug 25, 2017 6:47 pm
Forum: C++ Development
Topic: wxRegEx question
Replies: 5
Views: 628

wxRegEx question

Why this doesn't match:

Code: Select all

  wxRegEx rx("[\\s]*[^\\s]+[\\s]*=[\\s]*[0-9]+");
  if (rx.IsValid())
  {
    wxString line = wxT("  ab = 12");
    if (rx.Matches(line))
    { ... }
  }
Other tools say it matches. Without the equal sign it does.

Thanks in advance!
Rob'
by Rob'
Mon Aug 21, 2017 10:04 pm
Forum: Compiler / Linking / IDE Related
Topic: C::B and static libs
Replies: 4
Views: 715

Re: C::B and static libs

No, it is the version that comes with wxPack.
by Rob'
Mon Aug 21, 2017 8:45 am
Forum: Compiler / Linking / IDE Related
Topic: C::B and static libs
Replies: 4
Views: 715

C::B and static libs

I have used C::B to create a test project using static libs. The linker produces the following errors: mingw32-g++.exe -LC:\dev\wxWidgets3.0\lib\gcc48_lib -o bin\Debug\StaticTest.exe obj\Debug\GUIFrame.o obj\Debug\StaticTestApp.o obj\Debug\StaticTestMain.o obj\Debug\resource.res -mthreads -lwxmsw30u...
by Rob'
Fri Aug 18, 2017 2:43 pm
Forum: Platform Related Issues
Topic: crash in wxmsw30u_gcc48.dll with code: 0xc0000005
Replies: 9
Views: 1088

Re: crash in wxmsw30u_gcc48.dll with code: 0xc0000005

Can you try what happens when you link wxWidgets statically? Sorry, that's above me. I get a lot of strange linker errors when I build my program. I'm using my own library, that is using wxGrid. This library links wxWidgets dynamically. I guess it is not possible to use a mix, isn't it? And the opp...