|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
making a library? DLL or .o file
Hi,
I am very solid in ANSI/ISO C and C++, but know very little proprietary library-oriented and API stuff (like the UNIX APIs for sockets and pipes or true Win32 programming). I have long searched casually on bookstore shelves and the net for a simple introduction into the process. I have learned MFC to some degree for making windows programs and gave tk a casual glance in Linux. Okay, my question: Do you know where I can find a good starting place to learn more about doing the following? 1) make a library in unix that I can dynamically bind to. This would be the notion of haveing a .h file and a .c or .cpp file that provides an implementation for the interface described in the .h file. I would then be able to compile a .o that can be used so long as the .h file is present? 2) Making DLLs. I believe this is roughly the windows equivalent of what I am getting at in point #1 above. Again, I am strong in my ANSI/ISO-level skillset that covers the core of both C and C++, but need to move to the next level by learning things like making libraries. I really don't care for Windows programming as MS code looks really weird to me (LPSTR and that kinda thing). Anyhow, if anyone has a nice nudge for me in the proper direction I would be grateful and I promise to RTFM as soon as I can find out where the FM is on these topics. Thanks very much, J |
|
#2
|
||||
|
||||
|
For question 1, see http://sources.redhat.com/autobook/...ml#SEC_Contents and check out chapters 10 and 17.
For question 2, it entirely depends on what language/tool you're using to create the DLL (Delphi, C++ Builder, Visual C++ etc.) The end result (i.e.) the compiled DLL has the same format, so a DLL written in one language can be accessed by a program written in another language. However, the method/syntax to create them depends on the language/environment. In Delphi, you would do something like this: http://delphi.about.com/library/weekly/aa041100a.htm In C++ Builder: http://www.visualcomponentlibrary.com/bcb/dll.htm Hope this helps! ![]() |
|
#3
|
|||
|
|||
|
Thanks Scorps
Eddie Rulez!
BTW, do you have any info on making the DLL the VC++ way? Thanks a million! J |
|
#4
|
||||
|
||||
|
For Visual C++, see http://msdn.microsoft.com/library/d...our_Program.asp
Better still, you might want to go ahead and buy a book. Most books on Visual C++ have at least one or two chapters devoted to DLL creation. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > making a library? DLL or .o file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|