Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: C/C++ header from Delphi DLL project


This question is answered.


Permlink Replies: 2 - Last Post: Feb 23, 2015 8:50 AM Last Post By: Jens Munk
Jens Munk

Posts: 11
Registered: 9/12/01
C/C++ header from Delphi DLL project  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 6, 2015 1:09 AM
I am currently writing a DLL in Delphi XE7 (64-bit) to be called from LabView. This is working fine, but it is cumbersome (and thus prone to errors) to create the LabView function, since it all has to be done by hand. If I could automatically create C header files from my Delphi project, there is a wizard in LabView that can read these and do most of the work for you.

According to the Delphi documentation you can turn "C/C++ Output file generation" on but it only appears to work for Delphi packages and not for plain DLL's. Am I missing something? If not, is there any other handy way to generate these C/C++ header files?

Thanks,

Jens.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: C/C++ header from Delphi DLL project
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 7, 2015 5:06 PM   in response to: Jens Munk in response to: Jens Munk
Jens wrote:

If not, is there any other handy way to generate these C/C++ header files?

You could use the command-line Delphi compiler, using the /JPHNE or /JL switch
to generate .HPP file(s) for the desired .pas file(s).

--
Remy Lebeau (TeamB)
Jens Munk

Posts: 11
Registered: 9/12/01
Re: C/C++ header from Delphi DLL project  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 23, 2015 8:50 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks Remy,

This works, although LabView is too picky to read it without crashing. Not Delphi's fault, though.

Jens.

Remy Lebeau (TeamB) wrote:
You could use the command-line Delphi compiler, using the /JPHNE or /JL switch
to generate .HPP file(s) for the desired .pas file(s).
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02