-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-02-21 16:36, katja wrote: > Hello, > > I'd like to know opinions from experienced developers about the use of > C versus C++ for dsp libs. > > I'm planning to write a compact library with audio analysis functions, > to be used with Pd in the first place, but meant to be portable to > other real time dsp frameworks. This project will contain several > routines which must share one interface to Pd, and C++ will be most > convenient for it. I've used C and C++ for Pd classes before, and both > seem to work properly and efficient. But I lack experience to know on > beforehand if there is some disadvantage of using C++ for a reusable > dsp library. This will be my first. Quite some dsp libs are written in > C, even today. Is there good reason to refrain from C++'s conveniences > for writing classes, and use C instead?
one problem with C++ is that name-mangling is different depending on which compiler/linker you are using. this basically means, that you cannot use your C++-library binary made with g++ in an application/... build with e.g. M$VC. note that you can avoid this, if you provide a public "C" API, and use C++ only as an implementation detail (e.g. and pass classes around as anonymous structs) fgmasdr IOhannes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9Dv7AACgkQkX2Xpv6ydvS65ACglhsaXkG8jvomyqfMxykWzjCx 5JkAn2fOVBypGw2Q5V0Nqr9tUAE6G9EN =IOG4 -----END PGP SIGNATURE-----
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
