User forums > Using Code::Blocks
Upgrading to wxWidgets 3.1.3
stahta01:
--- Quote from: spflanze on February 26, 2020, 05:01:38 am ---There is no message here about what the error was. Maybe there is a clue in the warning messages. There are 308 warnings. This same code compiled and ran before I upgraded from wxWidgets 3.1.2 to 3.1.3, and I did not get these warnings. The below snippet of them shows only one of each error type. For each line in this snippet there are actually many more of same error.
--- End quote ---
I do not believe that! You had no idea what compiler you were using!
You do know that switching from an 32 bit to 64 bit compiler can cause issues!
And, switching compiler versions can cause issues!
I give up I will let someone else waste their time trying to help you!
Tim S.
sodev:
--- Quote from: spflanze on February 26, 2020, 05:01:38 am ---This same code compiled and ran before I upgraded from wxWidgets 3.1.2 to 3.1.3, and I did not get these warnings.
--- End quote ---
No. Your original error was that the project used a non-existent compiler / toolchain and failed to execute a missing binary (the compiler). So you did more than "just" upgrade wxWidgets, the previous code also could not be compiled by a missing compiler. Then you did a lot of random changes that did not solve the original error and now you have a huge mess.
Upgrading wxWidgets is quite simple, especially if it's just a patchlevel upgrade, point to the new root directory (if you not simply replaced the contents of the current one) and do a FULL rebuild. That last step is the most "difficult" one, at least in my setup (CodeBlocks + MSVC) a simple Clean + Build / Rebuild in CodeBlocks does NOT remove everything so i manually delete all outputs (which is quite easy for me, because i do an out-of-tree build, i just delete the output folder, all outputs are inside there). Not sure if it works flawless with your setup, but a good candidate to get missed by the Clean step are precompiled headers.
Your warnings don't look like a x86/x64 mismatch, the linker should detect the architecture and spit out a different error / warning message (IIRC gcc does that on Linux). It looks like a static / dynamic mismatch of wxWidgets, you link the static libraries but the project is setup for dynamic libraries or reversed.
Best thing you can do is a fresh checkout of the last known working revision of your project and restart from there. It looks like your orginal project already is quite messy and contains dead settings and i don't know what else, but only upgrading wxWidgets should be an easy task. You should start with that first. And then you can try to switch the compiler and/or architecture, but for that you should better review the current settings and fix them properly.
spflanze:
I suppressed most warnings. In the build log I see now this:
--- Code: ---wx_pch.h.gch\Debug_TIA Designer_wx_pch_h_gch: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (4 minute(s), 19 second(s))
--- End code ---
spflanze:
I suppressed most warnings. In the build log I now see this:
--- Code: ---wx_pch.h.gch\Debug_TIA Designer_wx_pch_h_gch: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (4 minute(s), 19 second(s))
--- End code ---
It is likely the file it complains about was there before, and I missed it, because I payed attention only to what is in red.
I disabled precompiled headers and the above error disappeared. Now there are many other warnings, and errors, that appear in related pairs, such as this:
--- Code: ---C:\Engineering_Software\TIA Designer\src\Utilities.cpp|641|warning: 'void wxGridfData::AdjustMinGridHeight()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]|
C:\Engineering_Software\TIA Designer\src\opamp.cpp|210|undefined reference to `__imp__ZN11wxGridfData19AdjustMinGridHeightEv'|
--- End code ---
When I had this compiling in wxWidgets 3.1.2, I did not need to declare anything with dllimport. I did an incorrect change in Code::Blocks configuration to make it expect it. What could that be?
stahta01:
On windows, this warning is common and can normally be ignored "redeclared without dllimport attribute: previous dllimport ignored".
Tim S.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version