Adding Delphi Components to C++ Builder

Just got C++ Builder...looks great...I'm not defecting though...will be using it to enhance some peeve though...when will Borland get their help files right???

To the question:  I have two components directories: Registration and Source.  The source directory contains all the .PAS files that contain the componets classesa and relevant code.  The Registration directory contains a few .PAS files that contain only the minimum registration calls and the .DCU files of source files.  This all works like a charm in Delphi...I've separated things such, because in the past, during debugging, the integrated debugger had an annoying habit of popping into my component code...seems that a USES looks first for .PAS files then for .DCU files.

Anyhow, when I load up the registration .PAS file in C++ Builder and then go through the normal procedure for installing a component...during the component 'compile' and error pops up saying it cn't find XXX.pas.  So it obviously isn't looking for the .DCU file.  I was thinking I should add it to the project, except that C++ Builder won't give me access to any of the project options (the menu is grayed out).

So...what is the procedure for adding a Delphi-written component to C++ Builder???  Given how I have things set-up above?  I even tried compiling one of the .PAS source files to a .OBJ, but that didn't solve anything (besides I read that the .OBJs have to be in a special format and I'm not sure if Delphi 2 will create a .OBJ the C++ Builder is happy with).

I'm pretty sure this is a question between easy and moderate.  Correct me if I'm wrong and I'll adjust the points.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

I don't separate things the way you do, and I've had no trouble installing Delphi components into C++Builder.  Maybe you should try giving C++Builder what it wants, and put all the *.pas files into a single directory just for C++Builder.  It shouldn't take up much space, and will tell you if the file locations are really the problem.
mheacockAuthor Commented:
I have...the problem lies when I do integrated debugging...the
IDI debugger always pops into the code for my components.  This is really annoying.  The only way I got it to stop in Delphi 2 was to separate to have the registration .pas files located with the .DCUs of the source files.

So I can install my components into C++ Builder but there are annoying side effects.

Is there a way to convert a .DCU into a C++ Builder compatible .OBJ??
>Is there a way to convert a .DCU into a C++ Builder compatible .OBJ??

I don't think so, but I am looking at the files generated from compiling a Delphi component with C++Builder, and an OBJ file is generated.  You might try removing the source PAS file from the path after the component has successfully been compiled into the component library.  This should prevent the debugger from intruding, while still allowing the component to compile.

Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

mheacockAuthor Commented:
I tried that did work.  You should post again as
a question and I will award you points.

As an aside...I now have two registration directories.

      --Registration CBuilder
      --Registration Delphi

When installing the components in CBuilder, CBuilder overwrites (rewrites) the .DCU files, making them incompatible with Delphi.
Delphi complains when you try to install the components after you've installed them with CBuilder.  You may or may not have noticed this.  Therefore it is important to separate  your registration files, as Delphi and CBuilder will do different things to the .DCUs.

Anyhow, all comments will be saved in the database, so simply post a question saying, "See comments above".  I'll give you a B or an A...haven't decided.  But since you were the only one to respond, I'm leaning towards an A.
mheacockAuthor Commented:
If yuo don't have the source files in the same location as the .DCUs, like me.  Delphi will try and read the .DCUs as is.  CBuilder rewrites them.  Therefore after an install with CBuilder, the .DCUs are no longer compatible with Delphi.  Thought I'd re-explain, since I think I didn't make myself as clear as I could have above.
See comments above.

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
mheacockAuthor Commented:
Adjusted points to 80
mheacockAuthor Commented:
I increased the points by 5, so that you'll be on the experts points board.
Thank you.  
I hope you Like CBuilder as much as I think I will.  My first complaint about Delphi was that it used Object Pascal rather than C++, But with CBuilder, we get the best of BOTH worlds.

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

From novice to tech pro — start learning today.