AuroraMon - how to set up development environment for this application

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
nbl1268
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Jun 23, 2022 10:06 pm

AuroraMon - how to set up development environment for this application

Post by nbl1268 »

Hi All, new to wxWidgets.

Found this AuroraMon application that will allow me to talk to my solar inverters
http://auroramonitor.sourceforge.net/

Would like to make a few refinements to this application, thus trying to set up a development environment to do that.
C++ isnt my usual,moderate experience with VB and python... but i'm confortable working htourhg the C++ syntax.

I've worked through the sets up get a basic wxWidgets environment set up using Visual Studio 2019 and latest wxWidget 3.1.7.
https://www.youtube.com/watch?v=sRhoZcNpMb4

I have successfully built the 'minimal' application and it runs.
wxWidget minimal app.png
wxWidget minimal app.png (28.58 KiB) Viewed 1035 times
I've used the same 'empty C++ application' approach as the starting point for the AuroraMon application.
Having then added 'existing items' to pick up the existing code and header files (available from sourceforge).
https://sourceforge.net/projects/aurora ... amon-1.07/
AuroraMonSolution.png
AuroraMonSolution.png (9.97 KiB) Viewed 1035 times
Note i havent changed any other properties from those that worked for the 'minimal' app.

At this point i have a number of errors show up (approx 160), this is before i attempt to build the code 'as is'
AuroraMonErrors.png
AuroraMonErrors.png (27.7 KiB) Viewed 1035 times
I haven't yet attempted to deal with the depreciation warning, thought i'd look to initially disable it to confirm i can successfully compile the application first, then work through updating each.

The type redefinition error is one that i havent yet worked out how to resolve.

So, any guidance to help me get a working development environment set up for this application welcomed.
thanks in advance
Neil
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: AuroraMon - how to set up development environment for this application

Post by doublemax »

Your working environment looks fine. As this code was hosted on sourceforge, i guess it used a much older version of wxWidgets, probably 2.8.x

It will require changes to the code to make it work with the latest 3.1.x
E.g. wxWidgets now uses winsock2 as default, older versions used winsock(1). Try including <winsock2.h> before any other wx header.

You could also try to find out which wxWidgets version was used for the code and get that one.
Use the source, Luke!
nbl1268
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Jun 23, 2022 10:06 pm

Re: AuroraMon - how to set up development environment for this application

Post by nbl1268 »

Thanks @doublemax
Yes, there's not a lot to go on and i haven't been successful in contacting the original developer.

There is a note in the make file that, to me, confirms wxWidgets v2.8, will give that a go.
Assuming id just need to build the relevant x86 and x64 versions and update my WXWIN variable accordingly?
nbl1268
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Jun 23, 2022 10:06 pm

Re: AuroraMon - how to set up development environment for this application

Post by nbl1268 »

Can i trouble you for some more support?
I've set up wxWidgets-2.8.12, and successfully built the debug and release versions.

Attempting to get the minimal application working.
Followed same steps re 'empty project' adding applicable the code from

Code: Select all

$(WXWIN)\samples\minimal
And setting the project properties accordingly (followed same steps noted from previous set up).
However i am getting 'unresolved external symbol errors
wxWidget_Test-2.8.12_errors.png
wxWidget_Test-2.8.12_errors.png (35.03 KiB) Viewed 987 times
I've read through a number of article in this forum re this error but alas have found one that helps me.. .sure I've missed a step or setting...
And other guides that seemed close to what i am trying to do
https://rhyous.wordpress.com/2009/12/16 ... udio-2008/
https://wiki.wxwidgets.org/Microsoft_Vi ... B%2B_Guide

Can you advise, where/what i need to be looking more closely at to get past this error?
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: AuroraMon - how to set up development environment for this application

Post by PB »

The errors seem to be all related to wxString.

wxWidgets 2.8 build defaults to ANSI (Unicode build must be asked for via UNICODE=1), while the newer one to Unicode. The character encoding of wxWidgets build and the MSVS application project (Advanced / Character set) must match. Do they for you?

TBH, I am not sure if this is worth pursuing. wxWidgets 2.8 is from 2006, so it is very obsolete now, e.g., not supporting any Windows feature introduced after Windows XP. Porting application from 2.8 to 3.2 may or may not be easy but it is likely to take several hours at least...

EDIT
Actually, building AuroraMon with MSVS 2022 using wxWidgets 3.1.7 in 64-bit mode took just few simple fixes
aurora.png
aurora.png (39.33 KiB) Viewed 973 times
There is still tons of warnings but they stem from the incorrect code (mostly shadowing variables). But building is just the start, MSVS reports memory leaks, the control layout at the bottom of the frame and in dialogs is broken (I am running the exe as PMv2 DPI aware on 125% scaled primary screen and the code does not use sizers) and I did not even test anything else and I did not look into it any further.

EDIT2
FWIW, the fixes can be seen here (and of course, updated code downloaded)
https://github.com/PBfordev/auroramon/commits/main
nbl1268
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Jun 23, 2022 10:06 pm

Re: AuroraMon - how to set up development environment for this application

Post by nbl1268 »

Nothing short of legend PB, many thanks :D.
Happy to go with latest wxWidgets, makes sense, attempted to use v2.8 to get base set up that i could compile before making any changes and upgrading.
Thanks of the repo, have it now and successfully built on my platform.

In terms of documenting the install steps and project properties to get to this point, were there many changes form the steps i used (first post)?
Looking to put some notes back on to http://auroramonitor.sourceforge.net/ to help the next person that might want to do the same.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: AuroraMon - how to set up development environment for this application

Post by PB »

nbl1268 wrote: Sun Jun 26, 2022 9:52 pm In terms of documenting the install steps and project properties to get to this point, were there many changes form the steps i used (first post)?
Looking to put some notes back on to http://auroramonitor.sourceforge.net/ to help the next person that might want to do the same.
As I did not want to spend much time on this, I just added the sources to my MSVS wxWidgets blank project.

If you want to make your changes public, you should probably create CMakefile to make it easy build anywhere with any supported compiler.
nbl1268
In need of some credit
In need of some credit
Posts: 5
Joined: Thu Jun 23, 2022 10:06 pm

Re: AuroraMon - how to set up development environment for this application

Post by nbl1268 »

Many thanks PB, i'll do some learning re CMakefile, assuming that'll answer the question in my head about compiling new version/s for Linux as well.
jal_frezie
In need of some credit
In need of some credit
Posts: 1
Joined: Tue Mar 05, 2024 9:14 am

Re: AuroraMon - how to set up development environment for this application

Post by jal_frezie »

I've been using auroramon in Linux for a long time, and I need to rebuild it now to run on my new SBC which is RISC-V architecture. It would be great if I could just build against the current wxwidgets package rather than have to dig out and compile version 2.8, so do you still have the updated auroramon code that works with the current wxwidgets? I couldn't find it on PB's github page. Thanks very much in advance...
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: AuroraMon - how to set up development environment for this application

Post by PB »

I guess I deleted my test repo but FWIW, here is nbl1268's GitHub repo (seems to include my build-fixes): https://github.com/nbl1268/auroramon

But perhaps there are better solutions then to attempt to revive this project (there appears to be bunch of them just on GitHub)...
Post Reply