GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Feb-2005, 15:59
r_m_zhang r_m_zhang is offline
New Member
 
Join Date: Feb 2005
Posts: 11
r_m_zhang is on a distinguished road
Unhappy

Need help creating dll in VC++


I was trying to create a dll in VC++ so that the dll wll be accessed from delphi later on. I was able to call some of the functions, which the function definitions come with .cpp file and the .cpp files were included when I created Dll project.

Now, I am stuck with one problem. Some of the function definitions, which I need badly, are in a library file with extention .lib . Since it is not a C++ header file and .cpp file, I could not add it in the Dll project in the same as I did to .h or .cpp files. So what I did was when I was creating my Dll in VC, I was trying to include it in the Dll project by add "filename_lib" in Link as following:

Project->settings->Link->object/library modules:

But, it looks like it was now working. The program still does not know where to find these function definitions when I was trying to use them in delphi. Without these functions, I could not go any further. It will be highly appreciated if any of you has ideas how to include it in Dll.


Thank you and happy Chinese New Year to everyone.

Maggie
  #2  
Old 13-Feb-2005, 22:27
Max Payne's Avatar
Max Payne Max Payne is offline
Regular Member
 
Join Date: Apr 2004
Location: 3° 08 North 101° 42 East
Posts: 332
Max Payne is a jewel in the roughMax Payne is a jewel in the roughMax Payne is a jewel in the rough
if you hav the '.lib' file and '.h' file,
link the library '.lib' file using Project->settings->Link->object/library modules and include '.h' file in the dll where you want to use it.

now you should b able to us your functions in the dll...
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds
  #3  
Old 17-Feb-2005, 19:57
r_m_zhang r_m_zhang is offline
New Member
 
Join Date: Feb 2005
Posts: 11
r_m_zhang is on a distinguished road
Thanks. got it.

Quote:
Originally Posted by Max Payne
if you hav the '.lib' file and '.h' file,
link the library '.lib' file using Project->settings->Link->object/library modules and include '.h' file in the dll where you want to use it.

now you should b able to us your functions in the dll...
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
in great need of creating polynomial class fadedg2 C++ Forum 9 27-Mar-2006 19:55
Re: Creating my own MP3 Ringtone. admin Music Forum 0 04-Mar-2006 18:12
Can I import another Lib while I am creating a static library in C++.Net? How? george MS Visual C++ / MFC Forum 2 06-Jan-2005 17:07
Help creating lists of pointers The_Kingpin C Programming Language 0 11-Dec-2004 14:49
Problem with the function creating updating a linked list nkhambal C Programming Language 3 28-Oct-2004 21:45

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:18.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.