Alkanium 0 Posted September 23, 2023 Hello everyone, I am a technician in a company who is making business in Healthcare material. A long time ago, an employee programmed softwares for this company with Delphi 2009. Due to bugs we begin to have, I am in charge to upgrade the apps. But my boss doesn't want Delphi but C++. So I would like to know if I can import the source project into RAD Studio and convert it in C++ to upgrade it. I also began a new app in Delphi but my boss really wants C++, he thinks that Delphi is not good (because he has a friend who is programmer and said Delphi sucks ... very open-minded programmer, indeed). So I need your help to convert all stuff I have in Delphi to C++. It's fine if it's not perfect, I know that I will need to adapt many things, I just don't want to begin with a blank project. I wish you an exellent day and I am waiting for your replies ! Share this post Link to post
Alkanium 0 Posted September 23, 2023 1 minute ago, Alkanium said: Sorry for the mistake in the title, I inverted the e and the r. Share this post Link to post
Pat Foley 52 Posted September 24, 2023 (edited) 20 hours ago, Alkanium said: I just don't want to begin with a blank project. Start with a plan then! Good luck comes from months of careful planning. What about the database, the servers etc. For now, log the bugs to determine if the problem is data entry, codebase, or database design and queries used. Only should then you recompile the hpp files made in Delphi into C++. Edited September 24, 2023 by Pat Foley then added Share this post Link to post
Roger Cigol 107 Posted September 24, 2023 I don't know of anything that attempts to automatically translate delphi source code into C++. But Embarcadero RAD Studio C++ can use all the Embarcadero components that Delphi can use so if you use Embarcadero C++ you only have to (manually) translate the Delphi source codes specific to your project(s) into C++. I say "only" - this could still be a significantly complicated task. One bit of advice I always offer someone starting a new s/w project is to answer the question "how am I going to test it?" before you start. ("it" is both the overall project and each individual source code section). Share this post Link to post
uligerhardt 18 Posted September 25, 2023 (edited) Do you know Delphi and/or C++? How big is the app? The first thing that should come to mind before considering a rewrite is "Never change a running system". Edited September 25, 2023 by uligerhardt Share this post Link to post
Vandrovnik 215 Posted September 25, 2023 On 9/23/2023 at 12:11 PM, Alkanium said: So I need your help to convert all stuff I have in Delphi to C++. It's fine if it's not perfect, I know that I will need to adapt many things, I just don't want to begin with a blank project. So old bugs will be converted to C++ and new bugs will appear from the conversion itself 🙂 1 Share this post Link to post
Roger Cigol 107 Posted September 25, 2023 I'm not sure I totally agree here. Yes, if you use an automatic translation then old bugs will be converted to C++. But if you think whilst rewriting AND add unit testing for modules AND refactor if/when there are obvious weaknesses in the existing Delphi code structure then you can end up with a better system. But you need to be aware that it's a big task. 1 Share this post Link to post
Brian Evans 109 Posted September 25, 2023 (edited) In C++ Builder you can import/use Delphi units inside a C++ project, so you don't have to convert everything to C++ to get started. C++ Builder is C++ along with bindings for the Delphi VCL and other units so you will be using a lot of Delphi code under the hood even if all your application code is converted to C++. Edited September 25, 2023 by Brian Evans Share this post Link to post
Roger Cigol 107 Posted September 25, 2023 What Brian Evans says is true for RAD Studio (where you have both C++ Builder and Delphi). If you only have C++ Builder version you cannot use Delphi units in your project (although it does, as he correctly states) still use Delphi for all the VCL RTL etc. Share this post Link to post
Remy Lebeau 1436 Posted September 25, 2023 2 hours ago, Roger Cigol said: If you only have C++ Builder version you cannot use Delphi units in your project You should be able to, as it should have the command-line Delphi compiler available, so that 3rd party components can still be compiled and installed into the IDE for C++Builder to use. Share this post Link to post
Roger Cigol 107 Posted September 25, 2023 Hi Remy, I am interpreting "Delphi Units" to mean source code from the original Delphi project that Alkanium has been asked to convert to C++...... As always, what you say is correct. Share this post Link to post
David Heffernan 2353 Posted September 25, 2023 Love the engagement here from the poster 1 1 Share this post Link to post