visual studio exp2010 Win32 release build has different integer size when compiled on 64 bit machine

30 Views Asked by At

When I compile my project on Win7 64 bit platform in Debug mode I get the expected 32 bit integers. Something happens when compiling in Release mode where the integers become 64 bit. It mainly affects a bitmap header struct that I am using. Does anyone know how to force VS to compile for 32 bit?.

1

There are 1 best solutions below

0
PeterS On

OK Solved my misunderstanding of the problem. The Struct Member Alignment was set to default which caused the initial fault with Release build. What threw me was trying to debug the Release build to find out what was going wrong. I found a thread that mentioned the fact that Release build may not follow the source code and some lines may be missing. Once setting the member alignment to byte the exe file ran without an issue even though the debug still showed missing lines and could not locate symbols. Thanks for every ones patience and input it was a great help in finding a solution for my first question post.