hi, There is a program which might run under Linux and incorporates C, C++ routins using their DLL. I don't know much about this. How to make DLL in Linux? If it is not posible, how to do it in Windows? Thanks much Oliver
There is a program which might run under Linux and incorporates C, C++ routins using their DLL. I don't know much about this. How to make DLL in Linux? If it is not posible, how to do it in Windows?
The .so files (shared libraries) are equivalent to Windows DLLs. You can build these with the gcc compiler.
On Wednesday 05 April 2006 02:40 am, vince@complex.elte.hu wrote:
hi,
There is a program which might run under Linux and incorporates C, C++ routins using their DLL. I don't know much about this. How to make DLL in Linux? If it is not posible, how to do it in Windows?
The program is Linux-compatible, yet uses DLL files? That doesn't sound right. As another poster mentioned, DLLs (dynamic link libraries) are Win16 or Win32 or Win64 compiled binaries which contain libraries of code used by other Windows programs. In other words, they are compiled with a Windows-based compiler (C/C++/VB) and usually rely on other Windows libraries to function themselves (COM+, Kernel32/64...) as part of a glorious interrelation which results in one of them eventually breaking binary compatibility (by use of a CLSID) and thus causing "DLL-Hell." As for making a DLL in Linux, I suppose it is possible. Don't ask me how, though. Maybe it would help if you mentioned the program in question. -- kai - www.perfectreign.com www.livebeans.com - the new NetBeans community 43...for those who require slightly more than the answer to life, the universe and everything.
On Wed, 2006-04-05 at 12:34 -0700, kai wrote:
As for making a DLL in Linux, I suppose it is possible. Don't ask me how, though.
I've seen two types of DLL in linux. If you compile a program using winelib, you would get DLLs, and if you're developing in mono, they are also calling the libraries DLL
On Wednesday 05 April 2006 5:40 am, vince@complex.elte.hu wrote:
There is a program which might run under Linux and incorporates C, C++ routins using their DLL. I don't know much about this. How to make DLL in Linux? If it is not posible, how to do it in Windows? The general questions I thing were addressed by Anders and Kai. In general, C and C++ are very easy. To create a Linux shared object (eg .so), compile forst to a .o using the -fpic option of the gcc (and g++) compiler. gcc foo.c -c -fpic This creates an object with position independent code (-fpic is not necessary in 32-bit, but is in 64-bit and on IA64 and other boxes). Then, to create the .so, gcc -shared -o libfoo.so foo.o
To use that library, you can either link with it: gcc prog.c -o prog -L . -l foo Or, in your program you can use the dlopen(2) and dlsym(2) system calls. These are relatively standard in Linux and Unix. -- Jerry Feldman <gerald.feldman@hp.com> Linux Expertise Center (PTAC-MA/TX) Hewlett-Packard Co. 200 Forest Street MRO1-3/K12 Marlborough, MA 01752-3081 508-467-4315 (http://www.testdrive.hp.com)
participants (5)
-
Adam Tauno Williams
-
Anders Johansson
-
Jerry Feldman
-
kai
-
vince@complex.elte.hu