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

[Help] Can I do this with D?

 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
nullgate



Joined: 26 Mar 2005
Posts: 3

PostPosted: Sat Mar 26, 2005 12:32 pm    Post subject: [Help] Can I do this with D? Reply with quote

I've been a Java guru for almost 4 years and hiding from real system programming all the time (It's not a problem since I make a living by writing Java code).

But I'm working on an open-source project, where Java just doesn't fit. Digital Mars D is my first choice, since it fits my philosophy in many ways. However, I need crypto algorithm like RSA/SHA-1, and more (which is available in Java and C/C++).

My question is "Can I use DMC to access available C/C++ crypto library (or open-source packages) and link it to D?"

I choose D because I'm used to OOP, and I need high level type system to prototype complex algorithm and data structure. I really don't like Java 'coz JVM hide too many things, while D gimme almost everything.
Back to top
View user's profile Send private message MSN Messenger
brad
Site Admin


Joined: 22 Feb 2004
Posts: 490
Location: Atlanta, GA USA

PostPosted: Sat Mar 26, 2005 5:09 pm    Post subject: Reply with quote

I'm not sure about using DMC to link the existing libs. I believe it's not possible if the lib is in C++, but it definitely is if written in C. Just use DMD.

There may be some pure D crypto libs you could use.

Check here: http://svn.dsource.org/svn/projects/deimos/trunk/etc/crypto/hash/

BA
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sat Mar 26, 2005 5:36 pm    Post subject: Reply with quote

If you have C/C++ source and you can compile it in DMC, you should be able to produce a .lib which can be linked into a D project. C++ classes can't be accessed directly, but functions should be accessible.

You also should also be able to use functions from a .DLL written in C/C++, but that's trickier than using a .lib (IMO). I'd recommend you try the .lib method first.
Back to top
View user's profile Send private message AIM Address
nullgate



Joined: 26 Mar 2005
Posts: 3

PostPosted: Sat Mar 26, 2005 8:41 pm    Post subject: I have the source Reply with quote

But I don't have the right make file...
I'll try hard to make it work with DMC.
Back to top
View user's profile Send private message MSN Messenger
nullgate



Joined: 26 Mar 2005
Posts: 3

PostPosted: Sat Mar 26, 2005 10:01 pm    Post subject: how to deal with DLL? Reply with quote

I have both source and DLL.
If I can't compile the source, I think it's possible to write DMC codes which I can use in DMD.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General 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