"Dynamic Linking of .lib file in my project"
-
I have linked dynamic linked library myfunctions.lib file in my project by setting its path in Project/Settings/Link/Input. And I have to place myfunctions.dll either in the same folder of my project's exe or in the system directory. Can any one suggest me what should do ? if I want to place that myfunctios.dll in some other folder??
-
I have linked dynamic linked library myfunctions.lib file in my project by setting its path in Project/Settings/Link/Input. And I have to place myfunctions.dll either in the same folder of my project's exe or in the system directory. Can any one suggest me what should do ? if I want to place that myfunctios.dll in some other folder??
Add the folder path into the Additional Include Directories in the project settings.
« Superman »
-
I have linked dynamic linked library myfunctions.lib file in my project by setting its path in Project/Settings/Link/Input. And I have to place myfunctions.dll either in the same folder of my project's exe or in the system directory. Can any one suggest me what should do ? if I want to place that myfunctios.dll in some other folder??
chandni_chandrakant_maheta wrote:
Can any one suggest me what should do ?
About what?
chandni_chandrakant_maheta wrote:
if I want to place that myfunctios.dll in some other folder??
What other folder?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
I have linked dynamic linked library myfunctions.lib file in my project by setting its path in Project/Settings/Link/Input. And I have to place myfunctions.dll either in the same folder of my project's exe or in the system directory. Can any one suggest me what should do ? if I want to place that myfunctios.dll in some other folder??
chandni_chandrakant_maheta wrote:
And I have to place myfunctions.dll either in the same folder of my project's exe or in the system directory.
Either one will work normally. I would suggest in the EXE's local directory, just to make sure you do not mess up any other application that might be using the same DLL (if not an internal DLL) - if you having questions about something like this, dicking around with the Windows/System directory is a bad idea. Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
chandni_chandrakant_maheta wrote:
And I have to place myfunctions.dll either in the same folder of my project's exe or in the system directory.
Either one will work normally. I would suggest in the EXE's local directory, just to make sure you do not mess up any other application that might be using the same DLL (if not an internal DLL) - if you having questions about something like this, dicking around with the Windows/System directory is a bad idea. Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFilesbut my requirement is such that I need to make one folder in my project's exe's path, and I need to place myfunctions.dll in that folder. Doing so, it gives error tha "dll not found" and terminates the application.
-
Add the folder path into the Additional Include Directories in the project settings.
« Superman »
I tried out this, but it works in case we want to include lib or header files. In case of dll it does not work. Still it gives me the error that "dll ot found. ReInstalling the application may fix this problem."
-
but my requirement is such that I need to make one folder in my project's exe's path, and I need to place myfunctions.dll in that folder. Doing so, it gives error tha "dll not found" and terminates the application.
then you will need to explicitly specify the path to that folder. For example, if your application is in
C:\SomePath\
and the folder containing the DLL is calledModules
, you will need to pass the complete path to LoadLbrary(...) -C:\SomePath\Modules\MyLibrary.dll
. You can call::GetModuleFileName(...)
(I think) to get the complete path to the Executable, remove the executable name, and append the DLL's subdirectory and name onto it, and you have a complete path to the DLL. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles