Re: [WiX-users] CustomAction = .VC Runtime Dependency?
Running depends on a problem machine is just showing me issues with MSJAVA.DLL and MPR.DLL. The depends FAQ makes me think they aren't really issues to be concerned with. Also, building statically, I don't know of a machine that it does work on. I have only been testing on my development XP machine. When I was mistakenly building dynamically, it worked anywhere with .NET 2.0 (and on problem machines, depends showed MSVCP80.dll) From: Dustin Andrews [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 7:08 PM To: Rowland, Chris; [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Subject: RE: Re: [WiX-users] CustomAction = .VC Runtime Dependency? Ok. Now profile (run) the program under depends.exe on the machine having problems. Compare that to a run on a working machines and I bet you find what you need. -D From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 2:01 PM To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? The dependency walker doesn't use any unusual Dlls. If you haven't already tried this, get to a system where your custom action Dll fails, just copy depends.exe and your Dll onto it and see what it says about any missing dependencies. The only missing dll is MSJAVA.dll, which is not an issue as far as I understand. My preference with included libs and h files is to make sure that they are compatible, and I prefer the SDK to take preference over Visual Studio. I'd put the R2 directory at the top for h and lib if R2 was my target base OS. I ordered my additional library directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib; C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Lib; C:\Program Files\Microsoft Visual Studio 8\VC\lib; C:\Program Files\Windows Installer XML v3\SDK\lib and my additional include directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include; C:\Program Files\Windows Installer XML v3\SDK\inc The installer needs to run on XP and Vista. I'm using the 2003 R2 SDK because it was the newest SDK I saw, and was always pushed to the forefront when I searched Microsoft's site. Will that cause a problem when running on XP? Because the dll works to a degree when dynamically linked to the CRT, and doesn't work at all when statically linked, I'm thinking that libcmt.lib is a good suspect. One thing I've noticed, and maybe this is expected, is that my 2003 SDK Lib directory doesn't contain libcmt.lib. The AMD64 and IA64 subdirectories do, though. So with the above library directory sequence, libcmt.lib will be found in the VS8 SDK lib directory, while other dependencies (msi.lib, shlwapi.lib, and advapi32.lib) are all found in the 2003 SDK directory. Does that sound like a problem? It's not just that dependent Dlls need to be present - it's also all the exports that have to match the lib you included. How would one go about verifying this? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
I'm compiling my CA dll with the /MT flag. Running dependency walker on the system where it won't install shows the dll is dependent on msvcr80.dll. Why would the dll continue to be dependent on msvcr80.dll even though I've specified to link statically? A co-worker told me it's impossible to create a dll that statically links to a library, but that's certainly not the vibe I'm getting from everyone's comments. Additionally, the size of the dll doesn't change if I change the flag between /MT (multi-threaded static) and /MD (multi-threaded dynamic) As someone who doesn't know my way around visual studio very well, it sure seems like the flag is being ignored... Any ideas? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
In the General Configuration Properties, you also need to set Use of MFC to Use MFC in a Static Library. That should get rid of the dependency and increase the size of the dll. -Brian Simoneau -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 9:32 AM To: WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? I'm compiling my CA dll with the /MT flag. Running dependency walker on the system where it won't install shows the dll is dependent on msvcr80.dll. Why would the dll continue to be dependent on msvcr80.dll even though I've specified to link statically? A co-worker told me it's impossible to create a dll that statically links to a library, but that's certainly not the vibe I'm getting from everyone's comments. Additionally, the size of the dll doesn't change if I change the flag between /MT (multi-threaded static) and /MD (multi-threaded dynamic) As someone who doesn't know my way around visual studio very well, it sure seems like the flag is being ignored... Any ideas? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
Thanks for the suggestion. It didn't seem to have any effect though. The size of the dll (and all the other files in the build directory) stayed the same, and the msvcr80.dll dependency still exists. From: Brian Simoneau [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 9:35 AM To: Rowland, Chris; WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: RE: [WiX-users] CustomAction = .VC Runtime Dependency? In the General Configuration Properties, you also need to set Use of MFC to Use MFC in a Static Library. That should get rid of the dependency and increase the size of the dll. -Brian Simoneau -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 9:32 AM To: WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? I'm compiling my CA dll with the /MT flag. Running dependency walker on the system where it won't install shows the dll is dependent on msvcr80.dll. Why would the dll continue to be dependent on msvcr80.dll even though I've specified to link statically? A co-worker told me it's impossible to create a dll that statically links to a library, but that's certainly not the vibe I'm getting from everyone's comments. Additionally, the size of the dll doesn't change if I change the flag between /MT (multi-threaded static) and /MD (multi-threaded dynamic) As someone who doesn't know my way around visual studio very well, it sure seems like the flag is being ignored... Any ideas? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
Chris, Just for stupidity's sake, make sure you have changed that setting for the correct build. I spent almost an hour one morning wondering why something wasn't linking the way I expected, only to find that I had made the change in the release settings and was trying to use the debug build! :-) Boy did I feel stupid when I found that one! Serves me right for doing a batch build each time and thinking that if the file modified time was correct I must be using the right file! Regards, Richard P.S. I just looked at the configuration for the custom action we have. (Visual Studio 2005 - your mileage may vary.) We are apparently using the Use Standard Windows Libraries option instead of the static / dynamic MFC choices. Dependency walker shows just three direct dependencies - MSI.dll, USER32.dll and KERNEL32.dll. P.P.S. I also thought it is worth mentioning that for the purpose of this exercise you are probably only interested in direct dependencies. It is perfectly possible that Microsoft may decide to make some of their libraries dependent on msvcr80.dll, but if you are not using the runtime directly its use by other parts of the system should be transparent to your code. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 9:48 AM To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? Thanks for the suggestion. It didn't seem to have any effect though. The size of the dll (and all the other files in the build directory) stayed the same, and the msvcr80.dll dependency still exists. * C O N F I D E N T I A L I T Y N O T I C E * --- The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Peek Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
While its not the stupid error you pointed out, it was the result of another stupid error... I think. I'm still not good with the VS environment. It turns out, for whatever reason, I had been specifying msvcrtd.lib as an additional dependency. My interpretation is that it made the linker dynamically link to that instead of the correct static library. Adjusting my additional dependency list looked promising. It caused my dll to increase in size (seems good) and caused the Dependency Walker to show the dependency had gone away (also good.) However, in a throwback to days I thought I had left in my wake, the installer now bails when trying to access the dll with the handy failed to execute error... Dependency Walker isn't throwing up any (noteworthy) red flags this time around, so I might be stuck experimenting with build settings some more. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 10:12 AM To: Rowland, Chris; WiX-users@lists.sourceforge.net Subject: RE: [WiX-users] CustomAction = .VC Runtime Dependency? Chris, Just for stupidity's sake, make sure you have changed that setting for the correct build. I spent almost an hour one morning wondering why something wasn't linking the way I expected, only to find that I had made the change in the release settings and was trying to use the debug build! :-) Boy did I feel stupid when I found that one! Serves me right for doing a batch build each time and thinking that if the file modified time was correct I must be using the right file! Regards, Richard P.S. I just looked at the configuration for the custom action we have. (Visual Studio 2005 - your mileage may vary.) We are apparently using the Use Standard Windows Libraries option instead of the static / dynamic MFC choices. Dependency walker shows just three direct dependencies - MSI.dll, USER32.dll and KERNEL32.dll. P.P.S. I also thought it is worth mentioning that for the purpose of this exercise you are probably only interested in direct dependencies. It is perfectly possible that Microsoft may decide to make some of their libraries dependent on msvcr80.dll, but if you are not using the runtime directly its use by other parts of the system should be transparent to your code. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 9:48 AM To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? Thanks for the suggestion. It didn't seem to have any effect though. The size of the dll (and all the other files in the build directory) stayed the same, and the msvcr80.dll dependency still exists. * C O N F I D E N T I A L I T Y N O T I C E * --- The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Peek Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
[EMAIL PROTECTED] wrote: Adjusting my additional dependency list looked promising. It caused my dll to increase in size (seems good) and caused the Dependency Walker to show the dependency had gone away (also good.) Good signs.g However, in a throwback to days I thought I had left in my wake, the installer now bails when trying to access the dll with the handy failed to execute error... Dependency Walker isn't throwing up any (noteworthy) red flags this time around, so I might be stuck experimenting with build settings some more. So now's the time to add logging or even a MessageBox call to verify that the function is now being loaded and executed. -- sig://boB http://joyofsetup.com/ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
I'd appreciate any advice that could point me in the direction of solving this problem. With my project settings as they are, if I build the dll and the installer, the installer will fail with the usual premature termination error, because my dll failed to load. I started working from a template I found online, so I may have been following bad practices. I'm compiling with /MT and have the following lines in my source #pragma comment(lib,msi.lib) #pragma comment(lib,shlwapi.lib) #pragma comment(lib,libcmt.lib) #pragma comment(lib,dutil.lib) #pragma comment(lib,advapi32.lib) #pragma comment(lib,wcautil.lib) If I add this line #pragma comment(lib,msvcrt.lib) Before the libcmt line, I get the warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs That makes sense to me, because from what I understand, msvcrt is the dynamic multi-threaded library, and libcmt is the static one. The dll that results from having that line added is much smaller, which makes me believe its now dynamically linking dispite the /MT flag. The part I'm having trouble understanding is that with msvcrt.lib, the installer works (on systems where the runtime is installed), but without it, the installer dies un able to run the dll code. I'm assuming its either an issue with the project properties and/or my use of those #pragma directives, but I'm not sure how to proceed. Any ideas? (Obvious ones included :-) ) From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 11:34 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? So now's the time to add logging or even a MessageBox call to verify that the function is now being loaded and executed. Based on everything I've learned to this point, all signs point to something wrong in how I built the dll. I have logging throughout the dll already, and the project settings are all that changed (it was semi-working before.) In the past these executing action failed errors have meant a missing dependency. My tendency here is to suspect I have mismatched libraries or something along those lines, though I've got nothing to base that on. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
What tool version are you using to build your Dll? Msvcrt.dll goes back to VS 6.0. And what's dutil.lib/dll? Nothing in the SDK about it. And which version of the Platform SDK/Windows SDK are you using? Phil Wilson From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 10:42 AM To: WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? I'd appreciate any advice that could point me in the direction of solving this problem. With my project settings as they are, if I build the dll and the installer, the installer will fail with the usual premature termination error, because my dll failed to load. I started working from a template I found online, so I may have been following bad practices. I'm compiling with /MT and have the following lines in my source #pragma comment(lib,msi.lib) #pragma comment(lib,shlwapi.lib) #pragma comment(lib,libcmt.lib) #pragma comment(lib,dutil.lib) #pragma comment(lib,advapi32.lib) #pragma comment(lib,wcautil.lib) If I add this line #pragma comment(lib,msvcrt.lib) Before the libcmt line, I get the warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs That makes sense to me, because from what I understand, msvcrt is the dynamic multi-threaded library, and libcmt is the static one. The dll that results from having that line added is much smaller, which makes me believe its now dynamically linking dispite the /MT flag. The part I'm having trouble understanding is that with msvcrt.lib, the installer works (on systems where the runtime is installed), but without it, the installer dies un able to run the dll code. I'm assuming its either an issue with the project properties and/or my use of those #pragma directives, but I'm not sure how to proceed. Any ideas? (Obvious ones included :-) ) From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 11:34 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? So now's the time to add logging or even a MessageBox call to verify that the function is now being loaded and executed. Based on everything I've learned to this point, all signs point to something wrong in how I built the dll. I have logging throughout the dll already, and the project settings are all that changed (it was semi-working before.) In the past these executing action failed errors have meant a missing dependency. My tendency here is to suspect I have mismatched libraries or something along those lines, though I've got nothing to base that on. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
I never include a #pragma comment(lib) for any C runtime library, whether static or dynamic. For that I always use the /MT[d] or /MD[d] switch (normally set through the IDE). You can't link to multiple versions of the CRT. libcmt.lib is the static version of the CRT; msvcrt.lib is the import library for the CRT DLL. In case you're not familiar with the concept, the import library simply consists of a set of stubs and information to the linker to build the necessary import table. libcmt.lib and msvcrt.lib therefore contain 'implementations' of the same functions so you get link errors. I'm guessing dutil.lib and wcautil.lib are from WiX itself. They're static libraries, so that shouldn't be a problem. advapi32.lib and msi.lib are import libraries that are guaranteed to be present on any Windows system with Windows Installer; shlwapi.lib is the import library for shlwapi.dll, which was added in Internet Explorer 4.0 and should therefore be present on Windows 98, Windows 2000 and newer. The WiX custom actions don't support Windows 9X IIRC. Are there any more libraries listed in the Link section of the project properties? -- Mike Dimmick _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 15 May 2007 18:42 To: WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? I'd appreciate any advice that could point me in the direction of solving this problem. With my project settings as they are, if I build the dll and the installer, the installer will fail with the usual premature termination error, because my dll failed to load. I started working from a template I found online, so I may have been following bad practices. I'm compiling with /MT and have the following lines in my source #pragma comment(lib,msi.lib) #pragma comment(lib,shlwapi.lib) #pragma comment(lib,libcmt.lib) #pragma comment(lib,dutil.lib) #pragma comment(lib,advapi32.lib) #pragma comment(lib,wcautil.lib) If I add this line #pragma comment(lib,msvcrt.lib) Before the libcmt line, I get the warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs That makes sense to me, because from what I understand, msvcrt is the dynamic multi-threaded library, and libcmt is the static one. The dll that results from having that line added is much smaller, which makes me believe its now dynamically linking dispite the /MT flag. The part I'm having trouble understanding is that with msvcrt.lib, the installer works (on systems where the runtime is installed), but without it, the installer dies un able to run the dll code. I'm assuming its either an issue with the project properties and/or my use of those #pragma directives, but I'm not sure how to proceed. Any ideas? (Obvious ones included :-) ) _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 11:34 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? So now's the time to add logging or even a MessageBox call to verify that the function is now being loaded and executed. Based on everything I've learned to this point, all signs point to something wrong in how I built the dll. I have logging throughout the dll already, and the project settings are all that changed (it was semi-working before.) In the past these executing action failed errors have meant a missing dependency. My tendency here is to suspect I have mismatched libraries or something along those lines, though I've got nothing to base that on. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
The dependency walker doesn't use any unusual Dlls. If you haven't already tried this, get to a system where your custom action Dll fails, just copy depends.exe and your Dll onto it and see what it says about any missing dependencies. My preference with included libs and h files is to make sure that they are compatible, and I prefer the SDK to take preference over Visual Studio. I'd put the R2 directory at the top for h and lib if R2 was my target base OS. It's not just that dependent Dlls need to be present - it's also all the exports that have to match the lib you included. A recent example I came across was C++ code that would not load on Windows 2000. The lib file included the GetProcessId function which is not present on Windows 2000 and not protected by a _WIN32_WINVER value, so the reference in the code wouldn't resolve and kernel32 wouldn't load. Phil Wilson From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 12:02 PM To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? Thanks for the info Mike, I think I had the general idea about the static version vs the import library, though I wouldn't have known what to call them. I mentioned that when I included it, my installer kind of worked, because I thought it might be helpful in providing some sort of basis that the code was working in some scenarios. I never include a #pragma comment(lib) I went and removed all of the #pragma comment(lib) lines and added the following as my additional dependencies: Are there any more libraries listed in the Link section of the project properties? After removing the #pragma comment(lib) lines, I put the following under additional dependencies in the linker input tab. libcmt.lib msi.lib dutil.lib wcautil.lib shlwapi.lib advapi32.lib I've been suspicious that I might not be using the right libraries together... here are my additional library directories as listed in the properties gui. C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Lib; C:\Program Files\Microsoft Visual Studio 8\VC\lib; C:\Program Files\Windows Installer XML v3\SDK\lib; C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib If I build with those settings, it succeeds, but the installer quits when it tries to use the dll. If I remove libcmt.lib from the dependency list, I get lots of unresolved external symbol compile errors, ex. LicenseFileUtils.obj : error LNK2019: unresolved external symbol void __cdecl operator delete(void *) wcautil.lib(wcautil.obj) : error LNK2001: unresolved external symbol __RTC_InitBase From: Mike Dimmick [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 2:25 PM To: Rowland, Chris; WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [WiX-users] CustomAction = .VC Runtime Dependency? I never include a #pragma comment(lib) for any C runtime library, whether static or dynamic. For that I always use the /MT[d] or /MD[d] switch (normally set through the IDE). You can't link to multiple versions of the CRT. libcmt.lib is the static version of the CRT; msvcrt.lib is the import library for the CRT DLL. In case you're not familiar with the concept, the import library simply consists of a set of stubs and information to the linker to build the necessary import table. libcmt.lib and msvcrt.lib therefore contain 'implementations' of the same functions so you get link errors. I'm guessing dutil.lib and wcautil.lib are from WiX itself. They're static libraries, so that shouldn't be a problem. advapi32.lib and msi.lib are import libraries that are guaranteed to be present on any Windows system with Windows Installer; shlwapi.lib is the import library for shlwapi.dll, which was added in Internet Explorer 4.0 and should therefore be present on Windows 98, Windows 2000 and newer. The WiX custom actions don't support Windows 9X IIRC. Are there any more libraries listed in the Link section of the project properties? -- Mike Dimmick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 15 May 2007 18:42 To: WiX-users@lists.sourceforge.net Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? I'd appreciate any advice that could point me in the direction of solving this problem. With my project settings as they are, if I build the dll and the installer, the installer will fail with the usual premature termination error, because my dll failed to load. I started working from a template I found online, so I may have been following bad practices. I'm compiling with /MT and have the following lines in my source #pragma comment
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
The dependency walker doesn't use any unusual Dlls. If you haven't already tried this, get to a system where your custom action Dll fails, just copy depends.exe and your Dll onto it and see what it says about any missing dependencies. The only missing dll is MSJAVA.dll, which is not an issue as far as I understand. My preference with included libs and h files is to make sure that they are compatible, and I prefer the SDK to take preference over Visual Studio. I'd put the R2 directory at the top for h and lib if R2 was my target base OS. I ordered my additional library directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib; C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Lib; C:\Program Files\Microsoft Visual Studio 8\VC\lib; C:\Program Files\Windows Installer XML v3\SDK\lib and my additional include directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include; C:\Program Files\Windows Installer XML v3\SDK\inc The installer needs to run on XP and Vista. I'm using the 2003 R2 SDK because it was the newest SDK I saw, and was always pushed to the forefront when I searched Microsoft's site. Will that cause a problem when running on XP? Because the dll works to a degree when dynamically linked to the CRT, and doesn't work at all when statically linked, I'm thinking that libcmt.lib is a good suspect. One thing I've noticed, and maybe this is expected, is that my 2003 SDK Lib directory doesn't contain libcmt.lib. The AMD64 and IA64 subdirectories do, though. So with the above library directory sequence, libcmt.lib will be found in the VS8 SDK lib directory, while other dependencies (msi.lib, shlwapi.lib, and advapi32.lib) are all found in the 2003 SDK directory. Does that sound like a problem? It's not just that dependent Dlls need to be present - it's also all the exports that have to match the lib you included. How would one go about verifying this? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
When an entrypoint is missing, depends.exe shows the Dll icon in shaded red (pink?) and you see an error with text At least one module has an unresolved import due to a missing export function in an implicitly dependent module. I couldn't remember how obviously the error showed, but I just tried it. Can you zip up your Dll and send it as an attachment? Tell us your target OS where it fails because that matters. Phil Wilson From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 2:01 PM To: Wilson, Phil; WiX-users@lists.sourceforge.net Subject: RE: [WiX-users] CustomAction = .VC Runtime Dependency? The dependency walker doesn't use any unusual Dlls. If you haven't already tried this, get to a system where your custom action Dll fails, just copy depends.exe and your Dll onto it and see what it says about any missing dependencies. The only missing dll is MSJAVA.dll, which is not an issue as far as I understand. My preference with included libs and h files is to make sure that they are compatible, and I prefer the SDK to take preference over Visual Studio. I'd put the R2 directory at the top for h and lib if R2 was my target base OS. I ordered my additional library directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib; C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Lib; C:\Program Files\Microsoft Visual Studio 8\VC\lib; C:\Program Files\Windows Installer XML v3\SDK\lib and my additional include directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include; C:\Program Files\Windows Installer XML v3\SDK\inc The installer needs to run on XP and Vista. I'm using the 2003 R2 SDK because it was the newest SDK I saw, and was always pushed to the forefront when I searched Microsoft's site. Will that cause a problem when running on XP? Because the dll works to a degree when dynamically linked to the CRT, and doesn't work at all when statically linked, I'm thinking that libcmt.lib is a good suspect. One thing I've noticed, and maybe this is expected, is that my 2003 SDK Lib directory doesn't contain libcmt.lib. The AMD64 and IA64 subdirectories do, though. So with the above library directory sequence, libcmt.lib will be found in the VS8 SDK lib directory, while other dependencies (msi.lib, shlwapi.lib, and advapi32.lib) are all found in the 2003 SDK directory. Does that sound like a problem? It's not just that dependent Dlls need to be present - it's also all the exports that have to match the lib you included. How would one go about verifying this? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] CustomAction = .VC Runtime Dependency?
Ok. Now profile (run) the program under depends.exe on the machine having problems. Compare that to a run on a working machines and I bet you find what you need. -D From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, May 15, 2007 2:01 PM To: [EMAIL PROTECTED]; WiX-users@lists.sourceforge.net Subject: Re: [WiX-users] CustomAction = .VC Runtime Dependency? The dependency walker doesn't use any unusual Dlls. If you haven't already tried this, get to a system where your custom action Dll fails, just copy depends.exe and your Dll onto it and see what it says about any missing dependencies. The only missing dll is MSJAVA.dll, which is not an issue as far as I understand. My preference with included libs and h files is to make sure that they are compatible, and I prefer the SDK to take preference over Visual Studio. I'd put the R2 directory at the top for h and lib if R2 was my target base OS. I ordered my additional library directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib; C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Lib; C:\Program Files\Microsoft Visual Studio 8\VC\lib; C:\Program Files\Windows Installer XML v3\SDK\lib and my additional include directories C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include; C:\Program Files\Windows Installer XML v3\SDK\inc The installer needs to run on XP and Vista. I'm using the 2003 R2 SDK because it was the newest SDK I saw, and was always pushed to the forefront when I searched Microsoft's site. Will that cause a problem when running on XP? Because the dll works to a degree when dynamically linked to the CRT, and doesn't work at all when statically linked, I'm thinking that libcmt.lib is a good suspect. One thing I've noticed, and maybe this is expected, is that my 2003 SDK Lib directory doesn't contain libcmt.lib. The AMD64 and IA64 subdirectories do, though. So with the above library directory sequence, libcmt.lib will be found in the VS8 SDK lib directory, while other dependencies (msi.lib, shlwapi.lib, and advapi32.lib) are all found in the 2003 SDK directory. Does that sound like a problem? It's not just that dependent Dlls need to be present - it's also all the exports that have to match the lib you included. How would one go about verifying this? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users