Compiling C using C++ Builder

I have a C program which I want to create a GUI for it, I have tried to compile it using C++ bulider but I dont know what i am doing.  It will compile in Borland C++ 4.5, can I open the project straight into C++ builder or do I have to change it.  Could someone tell me how to Compile C using C++ builder?
LVL 1
Richard_EustaceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kishk91Commented:
If you using MS VC compiler then you must put befor every C function extern "C"

hope this helps..
kishk91
0
nietodCommented:
>> If you using MS VC compiler
????
"Compile C using C++ builder?"

The BC 4.5 _project_ is not compatible with the BCB _projects_.  But the source code will be compatible.  So you can't open the old project in Builder, but you can create a new project in builder and then copy in the source code file(s).

What type of program are you creating?  Is this an ordinary windows API program?  (i.e. it doesn't use MFC, VCL, OWL etc.)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard_EustaceAuthor Commented:
Do i start a new console project and add the .C files to it and compile it.  I have tried this and I get Lots of errors saying that a variable is assigned a value that is never used.  What am I doing wrong.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Richard_EustaceAuthor Commented:
To kishk91. Do I type extern "C" or extern "C";
0
kishk91Commented:
Hi.. nonon you type extern "C" without ;

for example:
this is the declaration
extern "C" HWND Function() ;

and

extern "C" HWND Function()
{


}


thats it..
regards
kishk91

0
kishk91Commented:
Hi.. nonon you type extern "C" without ;

for example:
this is the declaration
extern "C" HWND Function() ;

and

extern "C" HWND Function()
{


}


thats it..
regards
kishk91

0
nietodCommented:
Sorry, I did not respond sooner.  I had computer problems and lost access to the net for over a week.  To make things worse I am leaving tomorrow for a week.  I will return Jan 2nd.

>> I have tried this and I get Lots of errors saying that
>> a variable is assigned a value that is never used.  
>> What am I doing wrong.
Often this is not an "error", it is simply a harmless mistake.  However, if you get a lot of them, it suggests that something is wrong.  Can you post some of the code that produces the error?  (I can't respond until the 2nd though.)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.