Deploying a Visual C++ program using InstallShield Limited - c++

I am trying to deploy a simple C++ Open GL graphics program using InstallShield Limited Edition. I have managed to create an example installer, but my main program crashes on start up. My debugger gave me a pretty vague error
error_text 0x00cceb28 L"R6010\r\n- abort() has been called\r\n" const wchar_t * const
in file crt0msg.c
I have run dependency walker and it says that I am missing the following:
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
IESHIMS.DLL
As far as I know these are windows systems .dlls? I cant seems to run the profiler as dependency walker always hangs and crashes. I have tested my example project and it seems to be missing the same .dll's but runs fine.
The project has 2 external libraries in the dependencies (Never built one with external libraries before). I have also included a folder with text files next to the Primary output as is the structure in the release folder of VS2013. The assets folder etc seem to be compiling.
I have never deployed a project before, could anyone let me know what might be the cause?

The error was due to the assets folder not linking correctly. I am going to try a different installer however.

Related

Qt-Application Deployment doesn't work. Missing entry point and dll's

In the last months I created a project with the Qt-Creator version 4.7.0, Qt version 5.11.1 (open source version).
Now I tried to deploy it following the Qt doc and building the project with MSVC2017-64bit compiler as well as running windeployqt.exe afterwards on the generated executable.
As I tried to run the executable after the programm finished copying the neccessary dlls into the folder, a warning appeared:
The entry point ?
eventFilter#QAbstractItemView##MEAA_NPEAVQObject##PEAVQEvent###Z wasn't found in DLL "my/project/path/releasefolder/project.exe".
It seems to me like something was wrong with the Qt-Objects I use in my project, but I couldn't find anything, as it still worked flawlessly in the Qt-Creator.
A thought it might be due to the compiler having issues, so I changed it to mingw32, which I also tried to deploy the same way. But somehow in this case the warning disappeared, but many dlls were still missing even though windeployqt.exe should've already done that. And I also couldn't find them anywhere on my hard drive. I also tried a third compiler, but the issues weren't going away.
I searched online and only found people having problems with an entry point missing in a Qt dll or missing the Qt-Dlls in general, but haven't found anything related to my case.
I also tried Dependency Walker on every executable, but it found even more missing dll, which led me to believe the executables were somehow currupted so I tried it again and again, but with no success unfortunately.
Has someone any idea, why that could happen, or any suggestion for me?
Maybe I should change something in my project, even though it works fine in the IDE. I just need a way to deploy my Qt project in any way.
EDIT: Build using the Desktop Kit in Qt Creator with MSVC2017 the described warning appeared.
Build with Mingw32 (Desktop Kit) and with MSVC2017 using the UWP Kit in Qt Creator the following Dll was missing, that I haven't found anywhere on my hard drive: MSVCP140_APP.dll
EDIT2: I ended up downloading the required dll, to somehow get it to work, but it still didn't work. One build, that required that dll now started but immediately closes itself again and the other build was suddenly warning me of a missing procedure entry point.
EDIT [SOLUTION]: I let the Qt Creator create a whole new fresh project and copied all files from my old project in the new one. After that I only copied all the dll files into the folder and it worked.
Instead of relying on windeploy, manually add the dll. I am assuming you have built the project using mingw. Assuming you are using Qt 5.11.1, go to
C:\Qt\Qt5.11.1\5.11.1\\bin\ and copy all the dll files and paste in your executable folder. Also copy all directories from plugins folder (in /plugins) and paste in your folder. Now run the application, don't close the application. Now delete all the files from your executable folder. The one's not being used are deleted and the rest are left. I assume you are doing this on target computer. This might help.

How can I make my application find a third-party DLL using Visual Studio?

I have read many issues regarding and followed each one but nothing seems to work.
I am trying to include the rdkafka library into my project, but every time I run the application I am getting
The program can't start because librdkafka.dll is missing from your computer.
I can clearly see that librdkafka.dll as well as librdkafka.lib exist in the same directory. I have added the include files to the project, and I have also added the librdkafka.lib to the additional directories in the Linker section. The project builds fine but it throws that error at runtime.
Does anyone know how I can solve this issue?
When in Visual Studio by default it is searching for dlls in the project directory and running the application on its own will try to find the dlls in the current working directory. Moving the dlls to this location seems to solve the issue.

Application compiled with VS2013 wants VS2005 runtime

I have environment where both VisualStudio 2005 and VisualStudio 2013 are installed. And I have strange situation with some of the projects. I compile such projects with VS2013 and when I try to launch them through Explorer or command line I get an error - "The program can't start because MSVCR80.dll is missing ...". Why msvcr80 when I compile with msvcr120?
What I tried:
Put msvc*80.dll to directory with executable. I got runtime error "R6034. An application has made an attempt to load the C runtime library incorrectly..."
Checked binary dependencies with Dependency Walker. I saw that binary has dependencies to VS2013 runtime, and there is no mention about msvcr80.dll
Launched binary with empty PATH. I gave no positive effect.
Launched binary on another 'clean' pc. And it worked all right with vs2013 runtime.
How can this be?
Thank you for all, you was right. I just forgot, that I have installed old version of my product. It was launched in background and used old versions of libraries. So when I ran my new application it tried to use libraries that already had beed loaded. In another way Dependecy walker didn't check already loaded libraries and looked only in PATH.
MSDN link about DLL loading - https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms682586(v=vs.85).aspx

Application error - debug exe wont run

I've recently downloaded Assimp and I've run into some troubles.
I've linked the libraries and I can get the program to compile and it runs fine in Release mode; however, the Debug .exe hits me with this error:
The application was unable to start correctly (0xc0150002). Click OK to close the application.
Some more details:
I'm using VS2010 with Target Machine set to x86.
I am using the 32bit debug dll (Assimp32d.dll) that was provided, and I've tried setting runtime libraries to /MT, /MTd, /MD, and /MDd with no luck.
I read from other similar threads that I should run Dependency Walker on the .exe, but I'm not sure what the output means. I'll paste it here if this helps you guys.
Error: The Side-by-Side configuration information for "c:\users\-----\documents\visual studio 2010\projects\AssimpTest\debug\ASSIMP32D.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001).
Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Rather than rebuilding the libraries, I downloaded a different set of libraries (it was the SDK installer) and the debug dll's from that are working perfectly.
Just in case anyone has the same problem with the same software, this was the exact name of the installer that worked for me: assimp-sdk-3.0-setup.exe
I ran into the same problem when trying to run a 64-bit project in Debug mode when using Assimp 3.0.
What I did was go to assimp/workspaces/vc9, open assimp.sln in Visual Studio 10, convert the project, then rebuild the 32 and 64-bit dll.
Mind you, you've got to install boost for that as well, and edit the project properties so it points to the boost directory for includes.
There's probably a way to do it using CMake as well, but I found the whole process too cumbersome to bother with in the first place.
My solution was just to link the debug build to the release .dll files. No more issues, and I wasn't that interested in debugging the Assimp library anyway!
I faced the same issue, later on I downloaded the "assimp-sdk-3.0-setup.exe" file & installed it as a standard windows application.
I pointed Visual Studio Solution Include & Lib directories to respective folders from newly installed location, copied DLL to my application location. The problem was resolved. Hope this helps someone.
Cheers.

Packaging libraries with .exe

I've made an application using both the OpenCV and WxWidgets library. The code runs fine on my development machine.
However, when I transfer it to another windows machine I get the error
*"The program can't start because cv110.dll is missing from your computer.
Try reinstalling the program to fix this problem".*
Now, I'm guessing installing the same versions of OpenCV and WxWidgets as used in development would resolve this problem but this is a bit much to ask of a casual 3rd party user of my code.
In my IDE (Windows Visual C++ 2008) I've linked to the relevant .lib files by going to Properties->Linker->Input
How would I go about packaging the .exe so that it works on non-development machines?
i.e. if I include the .dll files, how would I need to change the linker configuration to reflect this ? Or, can the .dll files referenced by the .lib files be incorporated into the .exe ?
Sorry, I know this issue has come up before but I can't seem to find a resolution specific to my case. Any help would be appreciated!
OpenCV is built using dynamic libraries
The correct thing to do is create an installer containing your exe and the correct dlls you need. See https://stackoverflow.com/questions/1285591/installer-recommendation