Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » how to link a .dll?
icon5.gif  how to link a .dll? [message #10338] Tue, 03 July 2007 07:31 Go to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
i have a .dll and my .exe uses it. how to link .exe?
if i add the .dll name into Package Organizer, it gets a linkage option -l, which will not search for .dll. it complains that lib...a not found.
Re: how to link a .dll? [message #10344 is a reply to message #10338] Tue, 03 July 2007 12:12 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi,

you normally have an import library with with the same name as the DLL and .lib extension, try to link against this library.
If you don't have an import library, try to find something about its creation in the documentation.

Matthias
icon11.gif  Re: how to link a .dll? [message #10359 is a reply to message #10338] Wed, 04 July 2007 03:38 Go to previous messageGo to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
ok. how to convert .dll & .h to .lib?
can U++ do this? because in fact i generate the .dll from C++ code using it.
i saw the post by fudamin, but he said to compile "from outside". did not find this in manual.
thank you.

[Updated on: Wed, 04 July 2007 04:08]

Report message to a moderator

Re: how to link a .dll? [message #10362 is a reply to message #10359] Wed, 04 July 2007 10:19 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
You need to have a .def file that lists all DLL exports.
This file should have been created and using that you should be able to create an import library.
Try to find something about .def files in the documentation.
Unfortunately, I cannot help you since I am not using VC Sad.

Matthias
Re: how to link a .dll? [message #10366 is a reply to message #10362] Wed, 04 July 2007 11:22 Go to previous messageGo to next message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
masu wrote on Wed, 04 July 2007 16:19

You need to have a .def file that lists all DLL exports.
This file should have been created and using that you should be able to create an import library.
Try to find something about .def files in the documentation.
Unfortunately, I cannot help you since I am not using VC Sad.

Matthias

are you implying VC is required? I have not that either.
shouldn't U++ provide a way of using the dll it generates in other packages?
Re: how to link a .dll? [message #10367 is a reply to message #10366] Wed, 04 July 2007 12:22 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
Quote:


are you implying VC is required? I have not that either.
shouldn't U++ provide a way of using the dll it generates in other packages?


No its is not required.
Are you really sure no .lib has been created beside the .dll? The .lib and the .dll should be in the output directory.

I have no such problems...
Attached is a small project wich builds a "IdleTracker.lib" and a "IdleTracker.dll". May be you can use this as an example. The source is from "Sidney Chong". I just modified it for my needs and made the upp project.

- Ralf

Edit: It works with MSC71 and MSC8 but not with MINGW!

[Updated on: Wed, 04 July 2007 12:26]

Report message to a moderator

Re: how to link a .dll? [message #10383 is a reply to message #10367] Thu, 05 July 2007 04:07 Go to previous message
bonami is currently offline  bonami
Messages: 186
Registered: June 2007
Location: Beijing
Experienced Member
OK. i downloaded impdef and now have .def. but MinGW doc says nothing more of how to use this .def.
i added a library option from U++'s package management, giving the full path of .dll. then bing! it links. and tested on other machine, complaining no .dll found.
but what puzzles me is that after i renamed my .dll, it still runs well on my machine.
if this is ok, i do not need any .def or anything.

[Updated on: Mon, 09 July 2007 12:01]

Report message to a moderator

Previous Topic: Debug mode. What is the bug?
Next Topic: Can't stop at breakpoints in debugger
Goto Forum:
  


Current Time: Fri Mar 29 02:40:29 CET 2024

Total time taken to generate the page: 0.01475 seconds