Author Topic: Win32 Debug/Release  (Read 5963 times)

Offline sevendogzero

  • Multiple posting newcomer
  • *
  • Posts: 15
Win32 Debug/Release
« on: January 12, 2021, 06:33:29 pm »
Win32 app
Works as intended on Debug Target
Release target not processing events, no createwindow functions working etc.

Is this a Release target config setting?
Or maybe my code is bad
Thanks

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Win32 Debug/Release
« Reply #1 on: January 12, 2021, 07:28:15 pm »
What?
You're telling us that enabling optimizations breaks your app.
If this is the case go fix your program.
You probably have an UB (undefined behaviour) somewhere.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Win32 Debug/Release
« Reply #2 on: January 12, 2021, 07:37:15 pm »
I have never had issues with -O2 or below where the problem was not in my own code; but, I have had problems with -O3 where the problem was in a third party library I was using instead of in my own code.

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

Offline sevendogzero

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Win32 Debug/Release
« Reply #3 on: January 12, 2021, 07:39:38 pm »
Will do. Happy New year.
I have CB running on Win7 pc as well I may need to compare release settings. I tinker too much. User error no doubt.

Offline sevendogzero

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Win32 Debug/Release
« Reply #4 on: January 16, 2021, 07:18:57 am »
Read and re-read my project code..tightened up everything, every warning..still did not execute messages in WndProc while a Release target.

Solution:
1. Deleted all files in Bin\Release
2. Delete both manifest files (one in the root of my project, one in the Bin/Release folder)

It works now. Maybe this will make sense to someone. Just happy to go to the next step.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Win32 Debug/Release
« Reply #5 on: January 16, 2021, 07:59:39 am »
Read and re-read my project code..tightened up everything, every warning..still did not execute messages in WndProc while a Release target.

Solution:
1. Deleted all files in Bin\Release
2. Delete both manifest files (one in the root of my project, one in the Bin/Release folder)

It works now. Maybe this will make sense to someone. Just happy to go to the next step.

Before doing all that next time; try rebuilding the project instead of just building the project.

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

Offline sevendogzero

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Win32 Debug/Release
« Reply #6 on: January 16, 2021, 07:07:29 pm »
Tried that.
Back in the Borland C++ 5 days, I recalled having to clear those Bin folders, so I tried it...and presto!

I'm also thinking Precompiled headers seemed to snag me back then. For now, the step by step
code proofing refreshed my memory on Windows programming.
On to the next problem.

Offline sevendogzero

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Win32 Debug/Release
« Reply #7 on: January 16, 2021, 07:26:00 pm »
Hammering out some MessageCrackers now. Good to be back