Search found 95 matches

by tuk1
Tue Sep 22, 2020 5:22 am
Forum: Compiler / Linking / IDE Related
Topic: PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks
Replies: 4
Views: 837

Re: PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks

The batch file did the trick. I guess it didnt like the commands being block pasted into cmd. One last thing, when I tried to run the project at the end, I got some errors: ||=== Build: Debug in Test (compiler: msys2-mingw-w64-i686) ===| \Program Files\CodeBlocks\MinGW\lib\liboleacc.a||No such file ...
by tuk1
Sun Sep 20, 2020 2:23 pm
Forum: Compiler / Linking / IDE Related
Topic: PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks
Replies: 4
Views: 837

Re: PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks

Not sure if youre inviting replies here and couldnt find a way to pm. Using wx 3.1.4 and gcc 10.2.0 All went ok until the build step, tried the commands for dynamic and static, but both failed at the end: C:\Users\TP1\Desktop\CODE BLOCKS\wxWidgets-3.1.4\build\msw>IF %ERRORLEVEL% NEQ 0 goto FAIL C:\U...
by tuk1
Sat Aug 22, 2020 7:17 am
Forum: C++ Development
Topic: ramifications of not using sizers?
Replies: 8
Views: 366

Re: ramifications of not using sizers?

I have a few dialogs and panels created over a year ago that use sizers, and modification of them is an extremely painful and time consuming process, as any control anywhere on the same window impacts the layout of all controls in that same window. Are you using some kind of wysiwyg when building y...
by tuk1
Thu Aug 06, 2020 12:39 pm
Forum: C++ Development
Topic: wx, main() and global scope
Replies: 6
Views: 257

Re: wx, main() and global scope

Thanks for the help guys.

In the end I went back to my trusty old extern global.
Turns out it was better to fix the circular dependency issue by ironing out some silly includes.

Sometimes a global var is just the right way to go, in my case its a logger which I use in almost every function.
by tuk1
Wed Aug 05, 2020 2:07 pm
Forum: C++ Development
Topic: wx, main() and global scope
Replies: 6
Views: 257

Re: wx, main() and global scope

Another option is make the global pointer a member variable of your wxApp derived class. Then you can access it through the wxGetApp() macro. Unfortunately, that gives me the same circular dependency issue that has me looking for an alternative to the usual extern global way of doing things. You co...
by tuk1
Tue Aug 04, 2020 1:59 pm
Forum: C++ Development
Topic: wx, main() and global scope
Replies: 6
Views: 257

wx, main() and global scope

I was reading up on alternatives to global variables and one suggestion caught my eye: I would recommend that you not have global variables that are class instances that allocate memory from the heap. They will make it harder for you to use tools that check for memory leaks. Declare the global as a ...
by tuk1
Thu Jul 23, 2020 11:30 am
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

Just to confirm once upgraded to 3.1.3, no more errors when rapidly clicking buttons to start/stop threads.

...& the new skins look nice, looking forward to 3.1.4
by tuk1
Wed Jul 22, 2020 4:01 pm
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

Ok, I disabled vcpkg and everything magically righted itself. Capture.PNG I have no experience with vcpkg, so i don't know exactly what it does. According to the page: I can attest that it brings the overhead of working with third-party C++ libraries down to almost nil. Set up with wxWidgets in 5 mi...
by tuk1
Wed Jul 22, 2020 3:56 pm
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

Ok, thats cleared the link error but 99 other compile errors have now appeared, must be something else going on, never had to rename files like that before, normally its quite painless upgrading build versions.
Capture.PNG
Capture.PNG (65.98 KiB) Viewed 309 times
by tuk1
Wed Jul 22, 2020 3:45 pm
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

So I should change all these files from 30 to 31?
Capture.PNG
Capture.PNG (62.57 KiB) Viewed 312 times
by tuk1
Wed Jul 22, 2020 2:48 pm
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

Used the usual steps and commands to manually build v3.1.3. but projects wont compile:
Error LNK1104 cannot open file 'wxmsw30ud_xrc.lib'
Tried using vcpkg to resolve but still the same linker error, any ideas?
by tuk1
Wed Jul 22, 2020 5:40 am
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

I just ran your unmodified sample and could not get it to crash with any of the four methods. Is the info from your footer correct and you're using wxWidgets 3.0.5? If yes, please try again with a current version. I also could not reproduce the issue with the OP's code with none of the 4 methods de...
by tuk1
Wed Jul 22, 2020 5:34 am
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

Hi, There is a reason it's called MINIMAL... Thank you. Is there a reason you cant take a look with wxListCtrl included ..as you say its not part of the problem, so why remove it? The more code i have to read, understand and dig through, the less motivated i am to do so. I might look into it, but i...
by tuk1
Wed Jul 22, 2020 5:16 am
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

FWIW: the code posted in https://forums.wxwidgets.org/viewtopic.php?f=1&t=47358#p199921 lacks the source of origin but looks as one of mine. I cannot reproduce the issue there; however, race conditions are very timing sensitive and may not demonstrate on specific setup. I certainly do not have a ga...
by tuk1
Tue Jul 21, 2020 5:06 pm
Forum: C++ Development
Topic: wxThread->Delete() - Exception thrown: read access violation.
Replies: 31
Views: 936

Re: wxThread->Delete() - Exception thrown: read access violation.

Well, you asked for a minimized version of the real code( which does include wxListCtrl ), I'm not sure how to create a 'working' example of the real code once I remove the bare bones that makes the code work, sure I could create another code example that shows the issue but then that wouldn't be my...