[osg-users] Windows 7 beta: "The binary is not a valid Windows image."
jean-sebastien.guay at cm-labs.com
Sat Mar 28 08:44:09 PDT 2009
> If I get no opinions I'll just submit a modified CMakeLists.txt that
> includes /DYNAMICBASE.
OK, perhaps it's a result of my previous message being overly verbose,
but I got no responses. So I'm now going to do this and submit it.
One question for CMake experts (Philip? Mattias?): is there some way to
know the exact version of Windows?
I'm putting my option inside the IF(WIN32) ... IF(MSVC) ... block of the
main CMakeLists.txt (search for WIN32_USE_MP) but since this workaround
is only needed on Windows 7, I'd like to narrow down the condition even
more. Although I've put it as an advanced option, set the default to
OFF, and documented it as being necessary only to work around a bug in
Windows 7, so that could be enough too.
# This option is to enable the /DYNAMICBASE switch
# It is used to workaround a bug in Windows 7 when linking in
# release, which results in corrupt executables. See this page
# for details:
OPTION(WIN32_USE_DYNAMICBASE "Set to ON to build OpenSceneGraph
with the /DYNAMICBASE option to work around a bug when linking release
executables on Windows 7." OFF)
And this seems to work. I'll send the complete file as a submission soon
if there's no way to address the question above.
Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
More information about the osg-users