C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 12th, 2003, 02:26 PM
ahuimanu ahuimanu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Right Coast
Posts: 25 ahuimanu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 34 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old February 12th, 2003, 07:03 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,402 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 8 h 53 m 6 sec
Reputation Power: 4080
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!

Reply With Quote
  #3  
Old February 13th, 2003, 12:36 AM
ahuimanu ahuimanu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Right Coast
Posts: 25 ahuimanu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 34 sec
Reputation Power: 0
Thanks Scorps

Eddie Rulez!

BTW, do you have any info on making the DLL the VC++ way?

Thanks a million!

J

Reply With Quote
  #4  
Old February 13th, 2003, 03:00 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,402 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 8 h 53 m 6 sec
Reputation Power: 4080
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > making a library? DLL or .o file

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap