|
|
#1 |
|
Junior Member
Join Date: Mar 2004
Posts: 3
|
Could not load: ...\myplugin.dll
I have created a plugin that uses ADO to update an MSAccess database at install time, for registration purposes. The installation and plugin works fine on some workstations and doesn't work on others.
The workstations that work have Visual Studio 2003 installed on them. Does anyone know what conditions will generate the message in the [Details...] button during installation: Could not load:...\myplugin.dll? I am able to create this installer on the machine which can not load the DLL during installation, and since the installer is able to load the DLL at install file creation time, I thought it would work. Another strange situation is that I am able to create a seperate .EXE file with the same code inside the exported _dllspec function, and that will run on the workstations in question. So, my guess is that it is some compiler/linker switch that is preventing this from working. My compiler switches are: /O1 /Ob1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "REGDEMO_EXPORTS" /D "_MBCS" /D "_WINDLL" /GF /FD /EHsc /MT /GS /Gy /YX"stdafx.h" /Fp"Release/regDemo.pch" /Fo"Release/" /Fd"Release/vc70.pdb" /W3 /nologo /c /TP My linker switches are: /OUT:"Release/regDemo.dll" /VERSION:1.0 /INCREMENTAL:NO /NOLOGO /DLL /NODEFAULTLIB /OPT:NOWIN98 /ENTRY:"_DllMainCRTStartup" /IMPLIB:"Release/regDemo.lib" MSVCRT.lib comsupp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib I am a programmer, but I am not an expert in compiling. Chris |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Your DLL probably requires some runtime DLLs that are not present on those workstations. I would guess msvcr70.dll and some ADO DLLs. You can either distribute those DLLs, put them in $PLUGINSDIR before you call the plug-in or simply not use them and link statically.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2004
Posts: 3
|
Thank you 1000 times!! I have been fighting with getting anything to work and this fixed it!! You were exactly right!! It was the msvcr70.dll. Is there a way to make VS.NET compile with an older C Runtime requirement? Do I just need to find an older msvcrt.lib file to compile against? My program requires Windows 2000 or greater, all of which should have msvcrt.dll of at least version 6, I assume. Also, as a lesser important question, how do I prevent the horrendous non-word-wrapping from happening again during my posts, without manually formatting my paragraphs? Chris |
|
|
|
|
|
#4 |
|
Debian user
(Forum King) Join Date: Jan 2003
Location: Arch land
Posts: 4,917
|
Doesn't Visual Studio .NET come a Win32 Project without the .NET runtime?
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE. * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2004
Posts: 3
|
When I created a new project, I chose to create an empty
Win32 DLL project. I don't think it requires the CLR, but I'm not sure. But I also downloaded the source to a couple of plugins from the NSIS archive and then just inserted my functions in that code, leaving the compiler and linker settings alone, and that also wasn't working. I don't have my VS.NET compiler on this computer, but I have my MS VC++ 6.0. I notice that the MSVCRT.LIB that is with MS VC++ 6.0 requires msvcrt.dll. So, I am going to copy that onto my other computer and hopefully things will compile without the requirement of msvcr70.dll. -chris |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Instead of messing with libraries you can simply link statically. In MSVC 6 it's an option in the project setting. I'm sure that option exists in 7 too.
To create smaller DLLs simply avoid using MSVCRT just like NSIS and all of its plug-ins are doing. As for the word wrap, the forum software must have gotten confused by the long line of compiler switches. It shouldn't do it, you don't have to break the lines on your own. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|