Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: new activeX library c-files instead of pascal-files


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Aug 10, 2016 10:19 AM Last Post By: Peter Below
Adalbert Menhofer

Posts: 10
Registered: 4/10/03
new activeX library c-files instead of pascal-files  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 9, 2016 2:44 AM
Some time ago I used Delphi to compile C code. After that:

If I create a new Project: ActiveX-Library, then a new project will be created with the files in C-language
- unit1.cpp
- basepch0.h
- project139_TLB.pas (but this file is in pascal ?!)
instead of all pascal-files like before:
- unit1.pas
- project139_TLB.pas

the same effect occures in different Delphi Versions (Delphi2007,Delphi2009, and so on).
Please, how can I switch back to pascal-generated files ?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: new activeX library c-files instead of pascal-files  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 9, 2016 10:10 AM   in response to: Adalbert Menhofer in response to: Adalbert Menhofer
Adalbert wrote:

Some time ago I used Delphi to compile C code.

That is not possible. Delphi does not support C/C++, and never has. You
must have been using C++Builder at the time instead of Delphi.

If I create a new Project: ActiveX-Library, then a new project will be
created with the files in C-language

Delphi does not create .cpp/.h files. C++Builder does.

--
Remy Lebeau (TeamB)
Adalbert Menhofer

Posts: 10
Registered: 4/10/03
Re: new activeX library c-files instead of pascal-files  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 10, 2016 1:26 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
sorry, I meant "RAD Studio" to compile c code.
I need a lot of different versions, for example "RAD Studio 2007" because of some old .net-Projects (but also some 32-bit apps with a lot of pointers)

If I start "RAD Studio 2007", then new Project: ActiveX-Library, then a new project will be
created with the files in C-language.

But also if I start the link "Delphi 2007" and doing the same then the new project will ALSO be
created with the files in C-language.

I do not know how to tell "Delphi" - (not C++Builder or RAD Studio), that it should create .pas-files again, please.
And -mystic- also other Versions like "Delphi 2009" (not RAD or C++Builder) and so on are affected.

Edited by: Adalbert Menhofer on Aug 10, 2016 1:27 AM

Edited by: Adalbert Menhofer on Aug 10, 2016 1:27 AM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: new activeX library c-files instead of pascal-files [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 10, 2016 10:15 AM   in response to: Adalbert Menhofer in response to: Adalbert Menhofer
Adalbert wrote:

sorry, I meant "RAD Studio" to compile c code.

RAD Studio is not a compiler, it is an IDE that includes multiple personality
toolchains - one for Delphi, one for C++. Even if you run the fully IDE
with all toolchains loaded, you are still using the C++Builder personality
to compile C/C++ code.

If I start "RAD Studio 2007", then new Project: ActiveX-Library,
then a new project will be created with the files in C-language.

If you create the ActiveX library as a C++ project and not a Delphi project,
yes. If you have both Delphi and C++ personalities installed, and are running
the full IDE so both personalities are loaded at the same time, you can choose
which personality to use when creating a new project.

But also if I start the link "Delphi 2007"

That runs the IDE with only the Delphi personality loaded and not the C++
personality. In that scenario, you cannot create C++ projects, only Delphi
projects.

and doing the same then the new project will ALSO be created
with the files in C-language.

No, it does not. I just tried it, and it does not behave like you have described.

I do not know how to tell "Delphi" - (not C++Builder or RAD Studio),
that it should create .pas-files again, please.

There is no way, because the Delphi personality does not create C files to
begin with, only Delphi files.

And -mystic- also other Versions like "Delphi 2009" (not RAD or
C++Builder) and so on are affected.

No, they are not. I tried multiple versions. None of them behavior the
way you have described.

--
Remy Lebeau (TeamB)
Peter Below

Posts: 1,227
Registered: 12/16/99
Re: new activeX library c-files instead of pascal-files [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 10, 2016 10:19 AM   in response to: Adalbert Menhofer in response to: Adalbert Menhofer
Adalbert Menhofer wrote:

sorry, I meant "RAD Studio" to compile c code.
I need a lot of different versions, for example "RAD Studio 2007"
because of some old .net-Projects (but also some 32-bit apps with a
lot of pointers)

If I start "RAD Studio 2007", then new Project: ActiveX-Library, then
a new project will be created with the files in C-language.

But also if I start the link "Delphi 2007" and doing the same then
the new project will ALSO be created with the files in C-language.

What gets created (by the type library editor) is the interface
definition file, which uses Microsoft's interface description (or
definition) language. THis is based on C/C++ syntax, but for a Delphi
project the IDE also creates a matching PAS unit that contains the same
definitions in Delphi Pascal,when you save the IDL/RIDL file, and it
creates a default implementation of the interfaces and CoClasses
defined in the type library.


--
Peter Below
TeamB

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02