•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 402,510 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,667 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 361 | Replies: 4
![]() |
Hi,
ahm, I'm trying to make dll that will have 5 simple functions.
For example bool GetHTTPResponse(string url, string *buffer);
So, my DLL includes curl DLL, that includes 3 anoother libraries.
I just created simple function with name GetHTTPResponse, here is the source:
{
cout << "Test" << endl;
return true;
}
I compiled it, and these files were created: request.dll, librequest.a.
So, with my previous experiences I created new project (in Dev-Cpp) with name "runner".
I included "dll.h" and in the project options, I added this library "librequest.a". Then I compiled it, and everything went ok.
But now, there is the real problem, I need to make library to use in Delphi. But when I try to compile project (still in C++) without librequest.a, I receive this message: " [Linker error] undefined reference to `_imp___Z15GetHTTPResponseSsPSs' ".
Please, can you give me some solution, how to create dll, that won't need lib***.a, because I need to use it in Delphi.
And just one question, I know how to load some simple function from Dll in Delphi, but how can I load function with arguments...
ahm, I'm trying to make dll that will have 5 simple functions.
For example bool GetHTTPResponse(string url, string *buffer);
So, my DLL includes curl DLL, that includes 3 anoother libraries.
I just created simple function with name GetHTTPResponse, here is the source:
{
cout << "Test" << endl;
return true;
}
I compiled it, and these files were created: request.dll, librequest.a.
So, with my previous experiences I created new project (in Dev-Cpp) with name "runner".
I included "dll.h" and in the project options, I added this library "librequest.a". Then I compiled it, and everything went ok.
But now, there is the real problem, I need to make library to use in Delphi. But when I try to compile project (still in C++) without librequest.a, I receive this message: " [Linker error] undefined reference to `_imp___Z15GetHTTPResponseSsPSs' ".
Please, can you give me some solution, how to create dll, that won't need lib***.a, because I need to use it in Delphi.
And just one question, I know how to load some simple function from Dll in Delphi, but how can I load function with arguments...
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,699
Reputation:
Rep Power: 36
Solved Threads: 878
you might find the answer in one or more of these google links.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
But i don't need to create DLL in Delphi, but the main problem is, that I need to create DLL in C++. And there is the problem. When I try to use my C++ DLL in some C++ application I need to link it with lib***.a (my DLL is request.dll, so it's librequest.a). I know there is a way how to make DLL to don't need .a file for another application, but I don't know how can I make it.
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,699
Reputation:
Rep Power: 36
Solved Threads: 878
delphi programs call win32 api functions all the time and all those functions are in DLLs written in C language. Find out how your delphi compiler links those programs and you will have your answer.
<snip>
<snip>
Last edited by Ancient Dragon : Jan 17th, 2008 at 11:45 am. Reason: removed comment about moving thead to Delphi forum
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,699
Reputation:
Rep Power: 36
Solved Threads: 878
If you use LoadLibrary() and GetProcAddress() you may not have to have the *.a library. See MSDN for details
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- dll problem,help me:) (C)
- internet explorer / virus problem here (Viruses, Spyware and other Nasties)
- another bridge.dll problem please help? (Viruses, Spyware and other Nasties)
- Bridge.dll Problem (Viruses, Spyware and other Nasties)
- Bridge.dll error (Viruses, Spyware and other Nasties)
- HJT log file for your scrutiny please... (Concerning Bridge.dll) (Viruses, Spyware and other Nasties)
- DLL not woking - Please help me (PHP)
- Iexplore problem (Web Browsers)
- Please help with DLL error message! (Windows NT / 2000 / XP / 2003)
Other Threads in the C++ Forum
- Previous Thread: Allocating Memory for a huge array
- Next Thread: Compute distances between cities using c++



Linear Mode