FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using a D Library in a C or C++ Application

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
linkage



Joined: 07 Nov 2007
Posts: 1

PostPosted: Wed Nov 07, 2007 5:34 am    Post subject: Using a D Library in a C or C++ Application Reply with quote

Hi

Is it theoretical possible to link a D-Library to a C or C++ Application, without using any D specific types or methods?
Are there any ABI or Garbage-Collection problems?

Thanks.
Back to top
View user's profile Send private message
torhu



Joined: 30 Mar 2006
Posts: 56

PostPosted: Sun Nov 18, 2007 6:46 pm    Post subject: Reply with quote

Some useful links:

http://www.digitalmars.com/d/interfaceToC.html
http://www.digitalmars.com/d/cpp_interface.html
http://www.digitalmars.com/d/1.0/dll.html
http://www.digitalmars.com/d/1.0/windows.html
http://www.digitalmars.com/d/1.0/htomodule.html

As for linking, there's nothing special about D's object files. DMD on windows is binary compatible with DMC, on linux with GCC. GDC is binary compatible with GCC on all platforms. Someone reported a problem with returning structs, but I haven't had any problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group