Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-09

C++ source in fpc

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Desmond Coertzen

I need some advice:

I have a few c++ source files containing conversion functions. Is it at all possible to compile them into my fpc project?

I imagine I have seen this in kylix 3. Is this possible with fpc? Am I under the influence of a pipe dream?

Reply by email

Marco van de Voort
to Desmond Coertzen

In our previous episode, Desmond Coertzen said:

Show quoted text 7 lines
I need some advice: I have a few c++ source files containing conversion functions. Is it at all possible to compile them into my fpc project? Is this possible with fpc? Am I under the influence of a pipe dream?

Wrap it in plain C and stuff it in a library with libstdC++ linked to it. Then write a Pascal header for it, and use it like any C library.

I imagine I have seen this in kylix 3.

Could be, but that is because Borland also has a BCB C++ compiler that is kept strictly in line with Delphi from a compatibility aspect.

In BCB there is also specific syntax to declare stuff Delphi compatible.

Reply by email

Desmond Coertzen
to Marco van de Voort

Please accept my apologies to the ENTIRE FPC TEAM.

I should have never asked this. I was weak! (Pipe dream).

I have realized that this is the freepascal project, and all effort should be done to keep things in pascal. I am myself a big pascal fan, and I have forsaken my values and fundamentals. Please feel free to slap me.

I have stopped my whining and ported the code from c++ to fpc.

Problem solved.

Marco van de Voort wrote 24 lines
In our previous episode, Desmond Coertzen said: > I need some advice: > > I have a few c++ source files containing conversion functions. Is it at all > possible to compile them into my fpc project? > > Is this possible with fpc? Am I under > the influence of a pipe dream? Wrap it in plain C and stuff it in a library with libstdC++ linked to it. Then write a Pascal header for it, and use it like any C library. > I imagine I have seen this in kylix 3. Could be, but that is because Borland also has a BCB C++ compiler that is kept strictly in line with Delphi from a compatibility aspect. In BCB there is also specific syntax to declare stuff Delphi compatible. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email