News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Win32 Debug/Release

Started by sevendogzero, January 12, 2021, 06:33:29 PM

Previous topic - Next topic

sevendogzero

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

oBFusCATed

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!]

stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

sevendogzero

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.

sevendogzero

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.


stahta01

Quote from: 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.

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

sevendogzero

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.

sevendogzero

Hammering out some MessageCrackers now. Good to be back