Page 1 of 2

[SOLVED] Resource files must have the same version number

Posted: Thu Jun 18, 2015 1:57 pm
by nezos
Hi, after i upgraded to version 8 i get this error message when i launch my program:

Resource files must have same version number.

It is a program written in C++ and uses wxWidgets. Any idea what to look for?

---------------------------------------------------------------------------
Check last message for solution.

Re: Resource files must have the same version number

Posted: Thu Jun 18, 2015 2:34 pm
by eranif
Do you use XRC in your program?
If so, remove the version number form the XRC files

Eran

Re: Resource files must have the same version number

Posted: Thu Jun 18, 2015 5:10 pm
by eranif
BTW, usually these warnings are harmless (I got some of them in CodeLite itself, in the 'Trace' tab)
Building in release mode will make them go away.

Can you capture some of them in debug mode? and show the backtrace here?
They are probably generated by wxCrafter (the XRC files) and then converted into C++.

Eran

Re: Resource files must have the same version number

Posted: Thu Jun 18, 2015 5:13 pm
by nezos
I found seven .xrc files in the project's folder, remove the version (some had it some didn't) but the message still appears. Any other ideas?

Re: Resource files must have the same version number

Posted: Thu Jun 18, 2015 5:24 pm
by eranif
nezos wrote:I found seven .xrc files in the project's folder, remove the version (some had it some didn't) but the message still appears. Any other ideas?
The backtrace ?
It might give me a hint if it is embedded in the code by wxCrafter

Eran

Re: Resource files must have the same version number

Posted: Thu Jun 18, 2015 10:06 pm
by nezos
How do i get the backtrace?

Re: Resource files must have the same version number

Posted: Thu Jun 18, 2015 10:34 pm
by eranif
run your program under gdb.
once the assertion hits, get the backtrace from gdb

Eran

Re: Resource files must have the same version number

Posted: Fri Jun 19, 2015 12:20 am
by nezos
Hi Eran, nothing noteworthy appears on gdb logs, but i bumped on a post saying that:

"I was getting "Resource files must have same version number!" errors with one of my dialogues. It turns out it was saved by an older version of DialogBlocks and didn't contain a version number. After re-generating the file, things
worked."

This was an old post for 2.5 version. Is there a chance that i really need to add the version? And what version do you think would be correct?

Found also code in GitHub referring to this message. It has to do with wxWidgets but i am not sure what version it expects.

https://github.com/wxWidgets/wxWidgets/ ... xmlres.cpp

Re: Resource files must have the same version number

Posted: Fri Jun 19, 2015 12:54 pm
by nezos
Although i added to my xrc files version="2.5.3.0" it didn't change anything, i still get the message.

I then checked in Codelite by opening one by one my wxcp files and the version was 2.3.0.1 . I changed all the xrc files to this version, still nothing.

The http://docs.wxwidgets.org/trunk/overview_xrcformat.html specification for XRC says that it is optional to define a version, but it seems somehow that it is being checked. Why does the runtime code check the version ???

Re: Resource files must have the same version number

Posted: Fri Jun 19, 2015 5:40 pm
by DavidGH
Hi,

I just tried an old xrc project, created long before CL 8.0, in the current CL using wx3.0.2. It ran fine. FWIW the xrc version was 2.3.0.1.

Try using the New Project wizard to create a new 'Executable (wxWidgets + XRC frame)' project. Do you have the same problem there?

Otherwise, as Eran said, please post the backtrace (not the log) you get if you Pause the debugger when the error message fires. You can copy it from the 'Call Stack' pane of the Debugger View.

Regards,

David