Author Topic: Updating wxWidgets - Updating projects developed under a previous wx version  (Read 1429 times)

Offline charles5577

  • Single posting newcomer
  • *
  • Posts: 8
Hello,

My first time to post. I am a fairly experienced programmer: 40 years (student/engineer and not a developer) with the last 20 years using C++. Until several years ago with my work I used VC++ with MFC. I then started experimenting with CB and wxWidgets under debian. I then decided to try CB and wxWidgets under Windows 64 bit. This was somewhat of an informative experience but I got it working and have been ever since pleased with the results. Just a note: having used MFC made using wxWiggets easy, it was almost as easy as changing the letter C to wx. However, there are alot of advanges of using wxWidgets.

With Windows 10 - 64 bits I installed the Mingw compiler, CB and wxWidgets. I updated periodically and until recently was using:

Mingw-W64 7.3.0 (seh-rt_v5) with gcc 8.1.0
CB 17.12 (32 bit)
wxWidgets 3.1.2

I updated to the following:

Mingw-W64 7.3.0 (seh-rt_v5) with gcc 8.1.0
CB 20.03 (compiled from source)
wxWidgets 3.1.3 (compiled from source)

To do this I:

1. Compiled wxWidgets 3.1.3 (changing setup.h to use 2D graphics)
2. Modified CB 17.12 to use the wxWidgets 3.1.3 version
3. Compiled the CB 20.03 source code to get a 64 bit CB 20.03 using wxWidgets 3.13.

At this point all is good. I created a dll project and a Frame based project and they compiled and linked with the Frame based program running.

I then compiled and linked a couple of dll projects that were developed under wxWidgets 3.1.2. They compiled and linked.

Now comes the problem. I compiled and linked a Frame based project with my new cofiguration that was developed under wxWidgets 3.1.2. When I tried to run the project I got the error that "msw312u_gcc_cb.dll was not found". It should be looking for msw313u_gcc_cb.dll, ie. 313 rather than 312.

As I built, linked and ran a Frame based project under the new configuration I looked for the problem in

1. The CBP file of the project
2. The registry
3. The user directory files

Finally, I searched the internet extensively, no answer.

Question: How do I recompile, link, and run Frame projects developed under a previous version of wxWidgets using and updated version of wxWidgets?

As usual for programming, the answer is probably straight foward and I have probably missed something.

Any answer?
 



 

Online stahta01

  • Lives here!
  • ****
  • Posts: 7178
    • My Best Post
Did you do rebuild instead of build on the project?
If not, do so now and see if it fixes the problem.

If yes, please post the full rebuild log to check for places you failed to update.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 7178
    • My Best Post
Did you update the wxWidgets global variable inside Code::Blocks?

Settings -> Global variables

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline charles5577

  • Single posting newcomer
  • *
  • Posts: 8
Thanks for the quick replies.

For the old project I did a clean and build. Just to make sure with you suggestion I did a rebuild: same result did not change to the new version dll.

For the Global Variables I have

wx : updated for 3.1.3
wx31_64 : updated for 3.1.3

I do not have a wxWidgets global variable.

I forgot to add in my first post. I updated the CBP file, changed all wxWidgets references of 3.1.2 to 3.1.3.

Thanks


Offline charles5577

  • Single posting newcomer
  • *
  • Posts: 8
Hi again,

Forgot to add that when you create a new wxWidgets project, the wizard asks for the wxWidgets directory location. For the old configuration it was the directory wxWidgets-3.1.2. Afterwards, there seems to be no way to reverse this.

Thanks again for the help

Online stahta01

  • Lives here!
  • ****
  • Posts: 7178
    • My Best Post
So, till you post the build log, I have no more help to give you.
You either did not check the CB Project or you did something else wrong.

I will see how to make the wizard forgot; I never notice the problem because I always use a Global Variable.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 7178
    • My Best Post
I see no problem with the wxWidgets wizard.

It defaults to the prior value; but, why are you not changing it to the new value?

Edit: If you want it to be an global variable enter "$(#wx)" without the double quotes.

Tim S.
« Last Edit: April 11, 2020, 10:37:42 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline charles5577

  • Single posting newcomer
  • *
  • Posts: 8
Hello again,

Many thanks, Tim S. for your patience.

Concerning the process for a new project: I never meant to say that is is not working. The contary, I think it is just fine. However, to explain, I followed the following procedure to create the project that asks for the 3.1.2 dll when running.

1. File->New->Project->Projects : select wxWidgets project
2. Next Window : info window that can be skipped
3. Newt Window : Select wxWidget version. I selected 3.1.x
4. Next Window : Project Title …
5. Next Window : Project Details ..
6. Next Window : Gui Builder
7. Next Window : This is the origin of my question. It asks for the wxWidgets Folder Location. I entered c:\wxWidgets-3.1.2 (my location). My question was when I entered  c:\wxWidgets-3.1.2 does it mean that it will always look for 3.1.2 files, ie. the 3.1.2 dll,  even though I updated to 3.1.3. Once the project is created you cannot go back to change this.

I do not think that things sould be changed. I probably just need to learn how to use the global variables better.

As this is my first time to use this forum, I am not really sure how to send you the build log file. Do I copy/paste from the log tab when building into this forum page. Do I create a log file and so how do I create it and how do I send it? I guess that I use the "Attachments" feature below to send it?

As for the global variables: It would probably be better to send you captured bitmaps of the Global Variables using the Windows capture feature. is this OK?

 

Offline charles5577

  • Single posting newcomer
  • *
  • Posts: 8
Hi again,

I copied pasted the compile log into a file. I also campured the Global Variables Dialog to show you my setup. I attach both files to this message.

Offline charles5577

  • Single posting newcomer
  • *
  • Posts: 8
Hi,

I just found the problem! Like alwarys a stupid error of mine!

My frame program loads a library (dll) that I prevoiusly developed. I also recompiled and linked this library with the new wx 3.1.3 configuration before. Still got the same error of missing a wx dll  when trying to runn

I just now reopened the dll library a noticed that this library links to another dll library that I developed earlier. I just now recompiled and linked this second library with the new wx 3.1.3 configuration.

Went back to the Frame program and did a rebuild. The program ran.

Lesson learned: Make sure all dependencies are rebuilt and updated.

I would like to thank all who helped with this issue. Finally thanks to the wxWidgets and CodeBlock teams for developing a great IDE that is cross platform. Keep up the good work!