Sign in Join

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

Mailing lists / fpc-pascal / 2003-02

use of c++ libraries

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Olaf Leidinger

Hello everybody!

Let's say I've written a nice library in c++ and I'd like to use it in Free Pascal. The list archive sais that linking c++ libs (e.g. from gnu c++) isn't possible, yet - and using dynamic c++ libs isn't possible either.
How far is this support by now? Does the cvs version have this feature (if yes when will be the release of a stable version )? Or are there any alternatives (instead of re-implenting this lib in pascal)?

So far...

Ciao,

Olaf Leidinger

Reply by email

Marco van de Voort
to Olaf Leidinger
Show quoted text 9 lines
Hello everybody! Let's say I've written a nice library in c++ and I'd like to use it in Free Pascal. The list archive sais that linking c++ libs (e.g. from gnu c++) isn't possible, yet - and using dynamic c++ libs isn't possible either. How far is this support by now? Does the cvs version have this feature (if yes when will be the release of a stable version )? Or are there any alternatives (instead of re-implenting this lib in pascal)?

Yes, wrapping the necessary functionality in plain C first.

Reply by email

Unknown author
to Olaf Leidinger: Hello everybody! Let's say I've written a nice library in c++ and I'd like to use it in…
Olaf Leidinger wrote 6 lines
Hello everybody! Let's say I've written a nice library in c++ and I'd like to use it in Free Pascal. The list archive sais that linking c++ libs (e.g. from gnu c++) isn't possible, yet - and using dynamic c++ libs isn't possible either.

This is correct. It isn't supported, and it is not likely to be supported in the near future. It's a complicated issue, as there are no standards for name mangling in C++, which makes linking to it dependent on the C compiler version used to create the lib.

How far is this support by now? Does the cvs version have this feature (if yes when will be the release of a stable version )? Or are there any alternatives (instead of re-implenting this lib in pascal)?

Write a small C wrapper which you then call from Pascal. This is what e.g. Kylix does to access Qt.

Michael.

Reply by email

Olaf Leidinger
to Unknown author
Show quoted text 11 lines
> Hello everybody! > > Let's say I've written a nice library in c++ and I'd like to use it in > Free Pascal. The list archive sais that linking c++ libs (e.g. from gnu > c++) isn't possible, yet - and using dynamic c++ libs isn't possible > either. This is correct. It isn't supported, and it is not likely to be supported in the near future. It's a complicated issue, as there are no standards for name mangling in C++, which makes linking to it dependent on the C compiler version used to create the lib.

So I guess there isn't something on CVS I could use?

Reply by email

James Mills
to Olaf Leidinger
Olaf Leidinger wrote 13 lines
> > Hello everybody! > > > > Let's say I've written a nice library in c++ and I'd like to use it in > > Free Pascal. The list archive sais that linking c++ libs (e.g. from gnu > > c++) isn't possible, yet - and using dynamic c++ libs isn't possible > > either. > > This is correct. It isn't supported, and it is not likely to be supported in > the near future. It's a complicated issue, as there are no standards for > name mangling in C++, which makes linking to it dependent on the C compiler > version used to create the lib. So I guess there isn't something on CVS I could use?

Convert the c++ source to pascal :)

cheers
James

Show quoted text 6 lines
_______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email