Главная страница | назад





Article #16404: Calling Pascal from C++Builder

 Question and Answer Database
FAQ1404C.txt Calling Pascal from C++Builder
Category :C/C++ Language Issues
Platform :All
Product :C++Builder 1.x
Question:
How do I call Pascal routines and variables from C++ modules?
Answer:
An easy way to find out is to let C++Builder do it for you.
Put the Object Pascal declarations you need to translate in the
interface section of an Object {ascal unit. Now use the command
line compiler DCC32.EXE with the options j, p, h, n, and v.
Below is an example of called DCC32 to translate a file called
MyUnit.pas.
DCC32 -jphnv MyUnit.pas
After the compliler finished you will have a header file call
MyUnit.hpp, open it in an editor and will see the C++
declarations.
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99