Board index » cppbuilder » C++ Builder and straight 'C' app

C++ Builder and straight 'C' app

I am attempting to bring an older app into the C++ Builder IDE.  It is
straight 'C' code and works fine using BC++ 5 IDE, MS Dev Studio and
Watcom 11.  It also works fine if built from the command line with BCC32
version 5.3 / Tlink32 version 2.5.0.0.
I used IDEtoBPR -v to convert the project.  When attempting to open the
project, I get the following error message "Access violation at address
00528E14 in module 'bcb.exe'. Read of address 7369206D" followed by
"Error in module XXXXXX:  Call to Application->CreateForm is missing or
incorrect".
Trying to create a project manually results in a similar exception
message.  This is a complete working app in regular 'C' with it's own
WinMain() and several other functions.  I have downloaded and installed
the latest C++ Builder patches from the website.

So.....  What do I try next??  Your help will be greatly appreciated.

Jake Marsh
Vermont Creative Software

 

Re:C++ Builder and straight 'C' app


The solution is as easy as it is ugly.

add this to the bcb-generated project file (where the *was* a main, but you
probably removed it.)

#define main

That's all.  The IDE is looking for a symbol and not finding it.  The error
message stinks, IMHO.

Chris (TeamB)

Quote
Jake R. Marsh wrote in message <36A893A3.46454...@together.net>...
>I am attempting to bring an older app into the C++ Builder IDE.  It is
>straight 'C' code and works fine using BC++ 5 IDE, MS Dev Studio and
>Watcom 11.  It also works fine if built from the command line with BCC32
>version 5.3 / Tlink32 version 2.5.0.0.
>I used IDEtoBPR -v to convert the project.  When attempting to open the
>project, I get the following error message "Access violation at address
>00528E14 in module 'bcb.exe'. Read of address 7369206D" followed by
>"Error in module XXXXXX:  Call to Application->CreateForm is missing or
>incorrect".
>Trying to create a project manually results in a similar exception
>message.  This is a complete working app in regular 'C' with it's own
>WinMain() and several other functions.  I have downloaded and installed
>the latest C++ Builder patches from the website.

>So.....  What do I try next??  Your help will be greatly appreciated.

>Jake Marsh
>Vermont Creative Software

Re:C++ Builder and straight 'C' app


I have been using #define WinMain  with no probs...

Dave

Quote
Chris Uzdavinis (TeamB) wrote in message

<78a9ae$jd...@forums.borland.com>...
Quote
>The solution is as easy as it is ugly.

>add this to the bcb-generated project file (where the *was* a main, but you
>probably removed it.)

>#define main

Other Threads