QNX and DLL's

Does anyone know if QNX support DLLs? I know DLLs originated in UNIX, but
I’ve never seen one for QNX. Also, what is the option to the GNU librarian
(ar) to generate a DLL?

David de Leon

As you talk about GNU, you are probably asking your question for QNX6 (RTP).
QNX6 supports DLLs, they are rather called “shared libraries”. They are well
supported.
They have the extension “.so” as compared to “.a” (static libaries).
To compile a C or C++ file to be used in a shared library, you must use
the -shared option (cc -shared Foo.cpp)
To create a shared library, use the linker with the option -shared as well
(cc -shared -o libFoo.so Foo.o)
To create an executable that uses a shared library, use the -Bdynamic option
before you specify the library with “-l” (cc -o myapp
myapp.o -Bdynamic -lFoo).
Hope that answers your questions.
Markus


“David de Leon” <ddeleon@alkon.com> wrote in message
news:976ipo$1th$1@inn.qnx.com

Does anyone know if QNX support DLLs? I know DLLs originated in UNIX, but
I’ve never seen one for QNX. Also, what is the option to the GNU
librarian
(ar) to generate a DLL?

David de Leon

To add little bit of mud into water, ‘shared libraries’ in Unix/QNX6
sense are not the same thing as Windows/OS2 DLLs. There are many types
of shared libraries in general, QNX6 like most modern Unixes use ELF
shared objects to implement them. Windows DLLs are faster (i.e., using
functions from DLL incurs less performance penalties than code from ELF
shared object, compared to statically linked functions). The downside of
DLLs, they are considerably less flexible and harder to deal with.

To make it even more confusing, early versions of Neutrino used .dll
extension for ELD shared objects :wink:

  • igor

Markus Loffler wrote:

As you talk about GNU, you are probably asking your question for QNX6 (RTP).
QNX6 supports DLLs, they are rather called “shared libraries”. They are well
supported.
They have the extension “.so” as compared to “.a” (static libaries).
To compile a C or C++ file to be used in a shared library, you must use
the -shared option (cc -shared Foo.cpp)
To create a shared library, use the linker with the option -shared as well
(cc -shared -o libFoo.so Foo.o)
To create an executable that uses a shared library, use the -Bdynamic option
before you specify the library with “-l” (cc -o myapp
myapp.o -Bdynamic -lFoo).
Hope that answers your questions.
Markus

“David de Leon” <> ddeleon@alkon.com> > wrote in message
news:976ipo$1th$> 1@inn.qnx.com> …
Does anyone know if QNX support DLLs? I know DLLs originated in UNIX, but
I’ve never seen one for QNX. Also, what is the option to the GNU
librarian
(ar) to generate a DLL?

David de Leon