BGL Compiling errors in 64-bit

This is the Forum to discuss the use of SBuilderX (version 3.10 and above). For previous versions of SBuilder please use the "SBuilder for Flight Simulator FS2004" forum.
Post Reply
jasons
Posts: 3
Joined: Fri Feb 01, 2008 7:05 pm

BGL Compiling errors in 64-bit

Post by jasons » Fri Feb 01, 2008 8:27 pm

Hello all,

I am running sBuilderX on a 64-bit Vista box with SDK sp2. The application runs fine since tweaking the registry so that sBuilder finds the FSX and SDK install paths, the problem I encounter is an error when going to compile a project.

I have seen reference to the same 'BadImageFormat' error in fsdeveloper.com but the post has not been resolved.

I have noticed the follwing:

1. When I click the 'info' button on the properties page of any Exclude_All_etc polygon type, I receive the message 'The type is not described in the terrain.cfg!' Not sure if that is expected or relevant, however I will not that when attempting to compile a project without an exclusion polygon I receive the same message.

2. I recently read a Microsoft MSDN article http://msdn.microsoft.com/msdntv/transc ... cript.aspx that explains that when an application is compiled as processor agnostic and a 64-bit native COM object is not available, a BadImageFormat error will eventually be thrown when the application tries to open the 32-bit COM object or find the 64-bit one.

I may be way off base here (I have only enough programming skills to be dangerous) but I do notice that sBuilderX.exe runs in 64-bit mode in task manager. According to the MSDN, forcing the aplication to run as x86 (32-bit) may be one way to resolve 64-bit compatibility issues.

Sorry for the long winded post, I only hope I can help to resolve these issues for everyone out there wanting to use this great program on a 64-bit platform!

Regards, Jason

jasons
Posts: 3
Joined: Fri Feb 01, 2008 7:05 pm

Post by jasons » Sat Feb 02, 2008 3:20 am

[:D]Success!!

Luis,
I was able to force SbuilderX to run this evening in 32-bit mode and it solved the BGL compiling problem! It appears if sbuilderx was recompiled with the 'x86' compiling option set instead of 'Any CPU' this would be a quick fix to get the program to function completely in 64-bit Windows. Not sure if you are interested in doing so, but below I explain the workaround.

The tool and method I used this evening to test/resolve the issue involved using a .NET utility called CorFlags.exe

To resolve compiling errors received when running SbuilderX in 64-bit Windows:

1. Download CorFlags.exe from <u>http://www.apexsql.com/zips/CorFlags.zip</u> or install the .NET 2.0 SDK to aquire CorFlags.exe

2. Copy the corflags file to you sBuilderX install directory

3. Open a command prompt and so that you are sitting in the root of the sBuilderC install folder (F:\FSX ADDON\SBuilderX in my case)

4. Type - "corflags.exe sbuilderx.exe /32bit+

5. The 32-bit flag is now set. Execute sBuilder from your normal shortcut - Voila!

Optionally the corflags utility can be run with the /32bit- switch to set the application back to 64-bit mode.

For more information on CorFlags:
http://blogs.intesoft.net/post/2007/12/ ... ndows.aspx

User avatar
Luis Sa
Posts: 1736
Joined: Sun May 18, 2003 11:17 am
Location: Portugal
Contact:

Post by Luis Sa » Sat Feb 02, 2008 6:36 pm

Hello Jason,

Thank you for this information. I will check this in the next compile. In the meantime, I will point to this thread if I receive complains about this problem.

Kind Regards,

Luis

Post Reply