how to detect extension of shared library in cpp file
Lukasz Michalski <[email protected]> Wed, 28 Oct 2009 21:54:27 +0100
| Newsgroups | gmane.comp.sysutils.bakefile.devel |
|---|---|
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--===============3984290501941128607==
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="------------enigB29BC54D90628DD97D29CD92"
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB29BC54D90628DD97D29CD92
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hi,
Bakefile creates .dll files on MSW, .so files on Unix and .bundle files
on Mac.
I use autoconf and have code like this:
void
DbPlugin::load(const char* pFilename) {
std::string name;
name.append(pFilename);
#ifdef _MSC_VER
name.append(".dll");
mLibHandle =3D ::LoadLibrary(TEXT(name));
#elif defined(HAVE_DLOPEN)
name.append(".so");
mLibHandle =3D dlopen(name.c_str(), RTLD_LAZY);
#endif
};
My problem is that both Mac and Linux uses dlopen but bakefile creates
files with different extensions. Does anyone know what is the best way
to detect in .cpp file what extension should be appended to filename?
Any hints greatly appreciated,
Regards,
--=20
Lukasz Michalski
pgp key: http://www.zork.pl/lm.asc
--------------enigB29BC54D90628DD97D29CD92
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFK6K+DXDI/2JNib3oRAiRPAJ9KpHesrO0mlLJs23ry5eAcMn2jqwCggowo
o6O/l51IJeJsTo67CX+v09I=
=Z+88
-----END PGP SIGNATURE-----
--------------enigB29BC54D90628DD97D29CD92--
--===============3984290501941128607==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--===============3984290501941128607==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Bakefile-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bakefile-devel
--===============3984290501941128607==--