\wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

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
DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

\wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Thu Jun 11, 2020 3:02 pm

Done building project "wx_xrc.vcxproj" -- FAILED.
I just tried to rebuild wxWidgets solution under latest update of Microsoft Visual C++ 2019 using C++ 17 and got this error.
Any ideas?
Thanks!
Best Regards, Dave

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4245
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by ONEEYEMAN » Thu Jun 11, 2020 3:06 pm

Hi,
Could you please post an ACTUAL error?

Thank you.

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Thu Jun 11, 2020 3:16 pm

The above is not an actual error? Say what?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4245
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by ONEEYEMAN » Thu Jun 11, 2020 3:36 pm

Hi,
No, it is not.
Scroll up i the build log and post the actual error.

Thank you.

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Thu Jun 11, 2020 3:39 pm

The title of the post is the error message...

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4245
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by ONEEYEMAN » Thu Jun 11, 2020 3:42 pm

Hi,
Which compiler and version you are using?

And how do you do the build?

Thank you.

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Thu Jun 11, 2020 3:50 pm

That information is in the original post...

User avatar
doublemax
Moderator
Moderator
Posts: 14976
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by doublemax » Fri Jun 12, 2020 4:17 pm

I just built wx313 with VS2019 community without any issues.

Which solution file did you use?
Which configuration did you build?
Did you make any changes to the project or in setup.h?
Use the source, Luke!

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Sat Jun 13, 2020 12:57 am

Hi Doublemax - I built wx_vc16.sln, configuration Debug, also VS2019 community.
No changes to setup.h or project.
Thanks as always for your great support,
Best Regards, Dave

Code: Select all

1>------ Build started: Project: xrc, Configuration: Debug Win32 ------
1>xmlres.cpp
1>E:\wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier
1>Done building project "wx_xrc.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 23 up-to-date, 0 skipped ==========

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2469
Joined: Sun Jan 03, 2010 5:45 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by PB » Sat Jun 13, 2020 5:50 am

I have just successfully built 3.1.3 with MSVS Community 2019 v16.6.2 in Debug Win32 and x64 configurations, both in default C++14 as well as yours C++17 language standards.

If cleaning the build did not help, I would delete vc_* folders in WXWIN\build\msw (and perhaps also .vs folder there) and WXWIN\lib folders.

If this does not help, I guess it is possible that your sources somehow got damaged and you should delete everything and redownload, hoping you do not have hardware failure making your computer do bad things.

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Sat Jun 13, 2020 3:59 pm

Everything in the solution except xrc builds just fine.
I cleaned, deleted output libs .vs etc. and rebuilt - same result.

In xmlres.cpp:
- the offending line is 2844 stdID(wxID_RESET);
- symbol in previous line stdID(wxID_SETUP); is defined in include\wx\defs.h, which does not define wxID_RESET

The symbol wxID_RESET is only defined in file interface\wx\defs.h
I do not know why there are multiple files "defs.h" nor why this compilation seems to pull in the wrong one.

Again, no code or project modifications...
I did briefly try compiling with updated C++ 17 standard but that had no effect as I failed to change it for each project.
Aaarrggg...

I'm not using XRC at the moment so this isn't holding me up,
but I thought you'd want to know...

Thanks for the help,
Best Regards, Dave

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4245
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by ONEEYEMAN » Sat Jun 13, 2020 4:11 pm

Hi,
And if you do the global search for this symbol it is nowhere to be found other than in the docs?

Thank you.

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Sat Jun 13, 2020 4:38 pm

As stated above: The symbol wxID_RESET is only defined in file interface\wx\defs.h

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2469
Joined: Sun Jan 03, 2010 5:45 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by PB » Sat Jun 13, 2020 5:02 pm

DaveNadler wrote:
Sat Jun 13, 2020 4:38 pm
As stated above: The symbol wxID_RESET is only defined in file interface\wx\defs.h
Dave, you can easily verify this it not true, see e.g. here
https://github.com/wxWidgets/wxWidgets/ ... fs.h#L1822

Unless your wxWidgets installation is corrupted it must be there on your computer as well. It is on mine
wxID_RESET.png
wxID_RESET.png (40.94 KiB) Viewed 463 times
If this identifier were missing, no one could build wxWidgets, including official binaries. As I wrote before, it looks that you need to remove and redownload wxWidgets sources. No idea what happened there...

It is not surprising that the error manifest only for the xrc project, as it is the only one referring to wxID_RESET.


JFYI, the headers in the folder interface are used only for generating the doxygen documentation, never for the actual code.

DaveNadler
Experienced Solver
Experienced Solver
Posts: 51
Joined: Thu Nov 17, 2011 2:13 pm

Re: \wxWidgets-3.1.3\src\xrc\xmlres.cpp(2844,5): error C2065: 'wxID_RESET': undeclared identifier

Post by DaveNadler » Sat Jun 13, 2020 6:04 pm

I've somehow fat-fingered somehow and changed that one line.
Absolutely no idea how I managed to do that.
Replaced with the version from the repository and all builds OK.
Sorry about that, Thanks all for the help,
Best Regards, Dave

Post Reply