I am trying to install opencv in windows. The manual (secn 1.4) says "choose a build [e.g. vs2010, win32] and download", but there is only the full executable file available (for 2.4.2). So I downloaded that file, which then expanded into several directories. However, this directory list does not match what is shown under item 7 of the section - mainly the "bin" directory is missing. So I guess something more has to be done besides just clicking on the executable.
Under "build" dir, I see x86/vc10/bin (I am guessing that vc10 stands for visual c++ 2010). But how do I install these and link visual studio 2010 with it? The manual only says to setup "OPENCV_DIR" variable which should have "bin" under it, but I dont have that.
This seems like a real problem any new user would face with opencv installation. Any correct instructions and link available on how to install for windows+visual studio 2010?
Updates: Full solution posted below.
After much experimentation, I have got opencv-2.4.2(win-exe) + vstudio2010-express working together. Thanks to Abid, for providing a helpful link, an additional helpful link is http://blog.hcilab.org/bastian/2012/06/installing-opencv-2-4-windows-7-visual-studio
Here is the full list of steps:
set system var OPENCV_DIR = install_dir\build
set system var TBBROOT = tbb_install_dir
path += ;%OPENCV_DIR%\x86\vc10\bin;%TBBROOT%\bin\ia32\vc10
create empty project: File->New->Project->Win32ConsoleApp
add the following items in project->Properties:
ConfigProperties->VC++Dirs->Include: $(OPENCV_DIR)\include;$(TBBROOT)\include
Linker->General->AdditionalLibDirs: $(OPENCV_DIR)\x86\vc10\lib;$(TBBROOT)\lib\ia32\vc10
Linker->Input->AdditionalDeps: add lib items from opencv and tbb (in Debug and Release modes).
for details of which files to include, see http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
download image-display test file from above site, save it in the project dir. But the Test.cpp in that page requires more inputs, so it does not work easily. Instead, use the code from http://docs.opencv.org/doc/tutorials/introduction/display_image/display_image.html#display-image
Properties->ConfigProps->Debugging->CommandArgs: mention file name to be loaded
Tools->Option->Debugging->Symbol->MS-Server=yes (this removes most of the "PDB not found" errors)
Tools->Settings->ExpertSettings=on (this also removes some errors)
copy tbb_debug.dll and tbb.dll from TBBROOT\bin\ia32\vc10 to the project dir (I dont know why these are not automatically picked up with the settings done above)
Ctrl+F5 to run (start without debugging)
i think your installation is OK. just need to configure with VS
in Project Properties > C/C++ >
Add Additional Include Directory: C:\opencv\build\include;C:\opencv\build\include\opencv
C/C++ > Linker > Input add Additional Dependencies :
C:\opencv\build\x86\vc9\lib\opencv_core231.lib
C:\opencv\build\x86\vc9\lib\opencv_flann231.lib
C:\opencv\build\x86\vc9\lib\opencv_highgui231.lib
C:\opencv\build\x86\vc9\lib\opencv_imgproc231.lib
and more if needed
add OPENCV_DIR environment variable with value C:\opencv\build\x86\vc10\bin
more detail follow this OpenCV 2.1 with MS Visual Studio
Related
I'm trying to build the minimal wxWidgets sample on Windows, using Visual Studio 2019 Commmunity Edition, following the instructions from this page for using wxwidget binaries
I opened the "minimal_vc9.vcxproj" file in Visual Studio. Visual Studio upgrades the project file.
I then added the wxwidgets.props property file to the property manager, and then tried to build ( Build | Build Solution )
It fails with the following error:
1>C:\Users\Administrator\Desktop\wxwidgets\include\wx\msw\chkconf.h(91,1):
fatal error C1189: #error: "wxUSE_UNICODE_MSLU must be defined."
I am trying to help a friend who knows C++ and uses Windows to set this up, but am not sure how to do so. Note both he and I are new to using Visual Studio as well, and I can't find any references on how to fix this by Googling.
Note I am using the project file that came with minimal (no solution file was there), and can see that in it's configuration that it says "Use Unicode Character Set" at `Project | Properties | Character Set"
EDIT: I'm attaching a picture of the IDE/files we downloaded, which I believe are the 3.1.5 version, ie release version as of Dec 4, 2021?
It looks like you're using wxWidgets 3.0, as support for MSLU was removed since v3.1.0 ~8 years ago. Please download 3.1.5 binaries and open minimal.vcxproj project file to build the sample, there is really no reason to use a 10 year old version if you're starting developing with wx.
Also, completely unrelated, but it's considered to be a bad idea to use administrator account for development. wxWidgets certainly doesn't require any special rights.
I
It is very easy to build the library yourself.
Download the source code archive and unpack it in, e.g. c:\wxWidgets
Start msvc, do ^File->Open", navigate to c:\wxWidgets\build\msw and open the file wx_vc15.sln
Select "Build->Batch Build...", click "Select All", then "Build".
When the build is finished successfully, open c:\wxWidgets\samples\minimal\minimal_vc9.sln, let msvc convert it and choose " Build->Build Solution".
Then when everything is ready, create a project as "desktop application", apply the properties file and start coding.
Thank you.
I cannot seem to locate the .pdb files after I have created the OpenCV binaries; using Cmake and then building the OpenCV solution using VS2013. Any help?
As Martin Suggests in the comments above, see
Visual Studio 2010 not generating .pdb files
Plus different versions of OpenCV generate the files slightly differently. Search for .pdb files where you had compiled your OpenCV solution.
This is not the answer for this specific question, but since I did not find the solution and question took about it, I write it to this thread. I hope it may be useful for other fellow sufferer.
My problem was that I could not reach a subset of code in Debugging. During the Debug mode it told, that "The breakpoint will not currently be hit. No symbols have been loaded for this document", which is a well discussed problem. But the base problem was, that I could not even find a .pdb file, which should have been loaded, to reach that code. The problem was, that the Build properties of the project has not been set correctly.
To ensure, that you project generates the .pdb file, check the Build settings of the project:
Right click on project -> Select "Build" tab -> In the "Output" section click "Advanced..." button -> At "Debug Info:" dropdownlist select "full" option.
I have been having this issue with OpenCV 2.4.2 that it doesn't really get installed properly with Microsoft VS 2010 Express; It is always missing a dll file or two doesn't matter what I follow by Googling. Also, Visual Studio 2010 Express is only valid for a few days, so it is acceptable that VS will not behave well with OpenCV at that point. However, when I changed my IDE to CodeBlocks, it is even stranger because now I have missing dll files and also "Missing Entry Point" error because of a duplicate .dll file. I found this guide and followed what it told me to do:
http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
But it still doesn't work!! What I am after is a complete and definitive solution to integrating OpenCV (preferrably 2.4.2 version) on a Windows 7 64-bit machine. I have been turning Stackoverflow inside out but no solution is working for me. The problems are
WHEN USING VISUAL STUDIO:
Missing dll file (e.g. libopencv_core242d.dll, etc.)
WHEN USING CODE BLOCKS:
First it complains that libstdc++-6.dll is missing. When I download it to my C:\MinGW\libexec\gcc\mingw32\4.7.0 folder, it stops complaining about this. But now it complains that there is any entry point problem and some other .dll file is missing!!!
If someone has managed to make it work by hook or crook, I will be more than happy to know what it is, IN DEPTH. I don't believe that such an important library can be so stupidly distributed so that developers have to struggle night and day to make this work.
FYI, I have tried even the OPenCV website and frankly their instructions are a bit useless. Also, all the necessary information e.g. adding PATH, adding includes and libraries, etc. Please someone point me to the right direction as it has been two days and I cannot get anywhere. It is literally stopping my job now :(
As an answer, but probably a very simple one, I did the following and got rid of the problem:
1) Uninstalled code::blocks completely from the PC and downloaded the IDE-only version (i.e. withouth MinGW compiler), then installed it.
2) Downloaded the latest stable version of MinGW, installed, and added C:\MinGW\bin to PATH
3) Followed rest of the instructions from [link] http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
4) Just to be sure, copied the opencv .dll files from the build folder (i.e. the one that you have created "make" and "install" files using CMake) to the debug (i.e. the executables') folder.
This will fix the problems. In case, it doesn't it might be that you need to add some environment variables.
The software that I have found myself supporting, from time to time fails to run on different PC's. Generally they are new Win7 installs.
The error message is "this application failed to start because rtl90.bpl was not found..."
To rectify the problem I have out PC Support copy the rtl90.bpl file to the users system32 directory, however i would like to ensure this error no longer occurs.
I have googled and found the followling link rtl90.bpl problem
My question is this:
The option to "Build with runtime packages" is already selected under the Project options for this program, and does not appear to make any difference to the users getting the problem.
Do I have to specifically Add the missing rtl90.bpl file to the project?
Please note that I know very little about delphi programming.
Since you are marked the option Build with runtime packages in your project, the final exe will require be deployed with some additional bpl files. To avoid that dependencies you must uncheck that option y build your project. Now your exe wil be bigger but without dependences.
That package is a runtime package containing the VCL. You presumably also need to deploy rtl90.bpl for the RTL and possibly some others. By enabling runtime packages you are promising to deploy those packages where the executable can find them.
You have 3 main options:
Deploy the packages to a location that is contained in the PATH variable. Usually this means modifying PATH. You should never write to the system directory. It is owned by the system and you should respect that.
Deploy the packages to the same directory as the executable file.
Disable runtime packages and therefore build a single self-contained executable. The RTL/VCL code will be statically linked into your executable.
Option 1 is poor in my view. Relying on the PATH variable and the ability to modify it is fragile. Option 2 works but seems rather pointless in comparison with option 3. You deploy more files and larger files when you choose 2, so why choose it.
In summary I recommend option 3. Statically link all RTL/VCL code into your executable.
The only situation where option 2 wins, in my view, is when you have multiple related executables that are all deployed to the same directory. In that situation sharing the RTL/VCL code can make sense.
I am attempting to install the IP3000 components into my Delphi 6 environment.
I figured I'd see if any of you have had experience getting it installed. From the files I have, there seems to be an installer missing (I have the UNWISE.exe).
I've tried including just about every folder in the environment's library path and browsing path and then build and install the packages (.DPK) with no luck.
Unfortunately, these Tww DB aware components are interleaved throughout my project so I can't get by without this package.
Any help is appreciated.
IME, most component install problems have some variation of the word 'path': Search Path (Delphi), Library Path (Delphi), System Path (Windows).
My advice is to put the *.bpl and *.dcu generated by the compilation in a path contained
in the Windows path (if you want to have some sanity on this, get the Rapid Environment Editor tool to deal with the Win path - which have a system one and user env one).
After dealing with that, install again. And:
Create a new vcl forms project
Put a random sample of their components on the form (if you can see then on pallete)
Press F9 to compile
So, if works, your install is complete. Don't try this with your own projects, as you can get nasty surprises when this fail....