Code::Blocks

User forums => Using Code::Blocks => Topic started by: sevendogzero on January 12, 2021, 06:33:29 pm

Title: Win32 Debug/Release
Post by: sevendogzero 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
Title: Re: Win32 Debug/Release
Post by: oBFusCATed 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.
Title: Re: Win32 Debug/Release
Post by: stahta01 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.
Title: Re: Win32 Debug/Release
Post by: sevendogzero 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.
Title: Re: Win32 Debug/Release
Post by: sevendogzero 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.

Title: Re: Win32 Debug/Release
Post by: stahta01 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.
Title: Re: Win32 Debug/Release
Post by: sevendogzero 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.
Title: Re: Win32 Debug/Release
Post by: sevendogzero on January 16, 2021, 07:26:00 pm
Hammering out some MessageCrackers now. Good to be back