I have just finished writing a project using OF in VS2005. I’ve complied the Release but when I copy the binary folder with the exe and dlls, into another computer, it doesn’t work. The error message states that the computer does not have the necessary components for the exe to run.
Does anyone here know how do i properly deploy projects?
yeah somethings microsoft does are idiotic.
some info here:
these thread have a few different solutions on them - I think either the installation or manifest trick should work.
hope that helps!
apparently, i have tried the crt folder with the dll and manifest file. And it doesn’t work…
maybe you can get luck by asking in the visual studio discussion forums? I’m afraid I don’t know enough about the different versions of VS to be of much more assistance then in the forums I pointed out. Others on the forum might know more.
alternatively, you can recompile the app using codeblocks, which is distributable –
thanks for your reply. i think i will give codeblocks a try.
just wondering is porting the code over to codeblocks easy?
should be pretty painless, just make sure you copy the src and data folders over. slight more complicated is if you ahve alot of additional src, will need to add those files to the project, or addons / libraries, but it’s pretty seamless to move from one compiler to another.
install instructions for CB, follow up to and including step e:
I think cb can even open VS project files, but no garuntee that that will work. better to copy src and data to a CB example…
check the cb readme for more info
ok goodie and thanks a bunch for your help.
much appreciated. will give it a try now and let u know how it turns out!
followed the steps but when i build, i get the following error:
“opencvExample - Debug Win32” uses an invalid compiler. Skipping…
Nothing to be done.
did you download CB with Mingw or without,
if you download without, please try again with mingw
yes actually i did install the cb with ming
got it to compile now…
previous problem was due to the fact that codeblocks default ming compiler is in c:\ming
but now i have compile errors like this:
…/…/…/libs/freeImage/FreeImage.h:133: error: conflicting declaration ‘typedef uint32_t DWORD’
E:/Program Files/CodeBlocks/MinGW/bin/…/lib/gcc/mingw32/3.4.5/…/…/…/…/include/windef.h:229: error: ‘DWORD’ has a previous declaration as `typedef long unsigned int DWORD’
it seems there’s a conflict with the FreeImage.h
ok then as noted here:
Check the compiler settings -> path and names of executables under toolchain executables of this specific compiler.
sometimes, it doesn’t work to install CB on a non standard drive or in a non standard location (ie, on E: instead of C:/Program Files). check that mingw exists, and then check the compiler settings for CB and see if they point in the right place.
are you using this version?
hmmm… I haven’t seen this before, and we’ve been working a bit with windows xp / cb 8.02 / OF 0.05. do you happen to have a previous version of mingw, maybe from an older CB or devcpp?
are you using this CB project 0.05 -->
or did you import the visual studio?
thanks for reporting it – sorry it doesn’t work right away, for us it’s been pretty straightforward.
take care -
yep i am using the cb 8.02mingw.
but i am using the of_preRelease_v0.05_windows_VS_FAT version and i directly imported the project from vs
importing vs might be causing trouble (as I mentioned above, no guarantees :)). I’ve actually never tried it…
can you please try the CB package first?
I have decided to try out devcpp.
Do i have to download a new set of OPF files for devcpp like CB? If not, I could use the current OPF files for VS in devcpp?
Would devcpp be able to compile a standalone with not as much problems as VS?
we no longer support dev cpp since it breaks with the addons, etc and generally is full of bugs. alternative is code blocks (same compiler, mingw, but different more modern IDE).
follow the steps here, (download with mingw and install to c:/) –
up to, and including, step e.
Maybe I’m bit late, but may help others.
First you need have a release version of your project.
Sometime the program can not start even with a release version, this is a bug from VS 2005 (Microsoft admit that). So inside you VS folder you should have your redistrubt folder that contain all the dlls you need to deploy.
D:\Program Files\Microsoft Visual Studio 8\VC\redist\x86
most of time you can simple copy all these folders to you execute file location, then problem solved. if problem still exist, check do you file location should have a file called xxx.manifest. this is the file that tells your program where to looking all necessary dlls. if you missing that file, check for project folder, depends on how u setup or project, it will in one of the folder called release OF FAT version will been in happens for me, then use your notepad open that manifest file check if there anything about Debug, if does, delete that line. then eveything should be fine.
Thanks @patch, that (almost) worked for me. I ended up copying the VC installer from
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\1033\vcredist_x86.exe
and then simply installed it on the target machine. It’s 14mb and a five second install process.
Actually install the C++ redistributable packages associated with the compiler version that you compiled the project with. which is what @andre described above but you can also just download an installer from microsoft https://support.microsoft.com/en-us/kb/2977003