Missing file from computer "opencv_core249d.dll". Resolution with eclipse Version: Mars.2 Release (4.5.2).Closed - opencv

I am facing a problem with my visual studio 2013 ultimate. i would run a open cv project but iam getting a error message like this " opencv_core249d.lib" missing from ur computer. re install the program.
Solution : It works with eclipse Version: Mars.2 Release (4.5.2).

This is a missing .dll issue, not a missing lib issue. It usually occurs when the Environment Variables have not been correctly set in your Windows environment. To take care of this problem, there are 2 methods:
1) edit Environment variables
Go to ‘My Computer’ , right-click and select ‘Properties’. A window called ‘System’ will open, containing the Windows Logo on the right. On the left margin of this window, you will find a link named ‘Advance system
settings’. Click on it.
Another window called ’System Properties’ will open. On the bottom right corner of this window, click on the button named ’Environment Variables..’.
Under the ‘System variables’ column, look for a variable by the name ‘Path’. - Select ‘Path’ and click ‘Edit..’
In the ‘variable value’ row, add the following address:
\path to\opencv\build\x86\vc12\bin;
Please Note- Ensure that the new address added by you, and the address previously written in the ‘variable value’ row, are separated by a ; DO NOT REMOVE the previous environment variable addresses.
2) Manually copy the .dll files.
In case the first approach does not work for you, go to:
\path to\opencv\build\x86\vc12\bin;
You'll find all the dll files that you're looking for. Copy those files to directory where your source code is located.

Related

Equivalent of Notepad++ SCI_LINECOPY in Visual Studio 2019?

In Notepad++, view Settings > Shortcut Mapper > Scintilla commands. The command SCI_LINECOPY, currently assigned to Ctrl + Shift + X, copies the current line to the clipboard for pasting elsewhere. Very nice!
Does Visual Studio 2019 have something similar under Tools > Options > Environment > Keyboard? The Edit.Duplicate command, which copies the current line into the editor though not to the clipboard, is excellent but only superficially similar to SCI_LINECOPY.
For me, without any additional adjustment, this is a normal process as shown in the pictures below.
When the cursor is in the line (1), I can copy it to the clipboard without selecting the text first using Strg+C.
Followed of course by Strg+V (2) or optional by step (3).

How to Auto-Alignment Shortcut Key in Keil uVision?

I want to find Auto-Alignment Shortcut Key in Keil uVision. I tried some shortcut keys but I can not find. In Visual Studio I used to: CTRL + K + D , but in keil uVision I don't know how it is work.
For example :
When you type below ( usually copied from another text file which was not tabified correctly):
Use the shortcut key Auto Alignment with this block of code can auto formatting your code as below :
Stop searching. There is no such feature.
Was able to align in uVision5 with Astyle (http://astyle.sourceforge.net/).
File must be saved so that this tool can do its work.
Instructions :
Copy the Astyle.exe file to the Keil installation directory (e.g. D:/Keil_v5/)
Then open Keil and under the Tools menu, open the Customize Tools Menu option.
Create a new Menu Content, the name can be casual .
Command selects the Astyle.exe file in the keil installation directory.
Fill in Arguments !E
You can add a shortcut key for the operation in Edit.
Cheers to this https://www.programmersought.com/article/578892324/

How to get rid of this annoying W8123 warning in my IDE

This is what happened. We downloaded Quickreports 505, installed it, but had to revert to QR504. Now we are getting
[BCC32 Warning] W8123 Path 'C:\Program Files\Embarcadero\RAD Studio\8.0\Quickrep505C' not found - path ignored in option '-I'
This question has been asked on both Embarcadero, and quick report forums but all of their answers has been modify the cbproj file, which do not contain any references to quickreports.
I've tried removing all the references from the IDE but the warning still occurs. Any suggestions on how to fix what should be a simple problem.
Sources:
https://forums.embarcadero.com/thread.jspa?messageID=486503
http://forum.quickreport.co.uk/default.aspx?g=posts&t=1675
Using:
IDE: C++BuilderXE
Note I do not want to disable all warnings in the IDE, and I don't want to disable warnings in Code.
I've had the same annoying problem. To fix this I had to delete all reference to the file in the EnvOptions.proj file. This file is located in the ...AppData\Roaming\Embarcadero\BDS\8.0\ folder.
I got rid of this in my XE7 IDE directly via:
Tools > Options > Environment Options > C++ Options > Path and Directories.
There were invalid paths to libraries being referenced and showing up as warnings in the build. Select each of the ... icons to explore the list of paths included, and select Delete Invalid Paths to remove unused paths.
To enhance and update prior answers, this is what I had to do...
From the menus: [Tools] [Options]
In the Dialog box: [Environment Options] [C++ Options] [Paths and Directories]
Now at the top on the right side in the drop down pick: [32-bit Windows] (it started as Android)
The clear invalid paths in both tabs [Compiler] & [Classic Compiler]
Remove Warning Message File Path Not Found
[BCC32 Warning] W8123 Path 'C:.....' not found - path ignored in option '-I'
Version 10.4.2 Sydney
========
In IDE Right Click on Executable
Options...
C++ Compiler->Directories and Conditionals
Include file search path > (Double click)
then click on
Value from "All configurations - All platforms"
Click on ... in right hand side in text edit box on right hand side
Click on down arrow beside button "Tasks"
Delete Invalid Paths
"Save"
I have this project that I sometimes work at at the office and sometimes at home. And the paths of the external files are not the same on both computers, so I added them both in the folder lists.
Is there another way to supress these warnings without having to remove "invalid" paths from the folder lists?
Edit:
I thought I found the answer, but this setting doesn't work

OpenCV 245 first building errors

I downloaded the sources of opencv-2.4.5 and I followed the tutorial (on the opencv site for windows) about the installing my own libraries everything. Ok. I created the opencv.sln file with cmake then I opened it with visual studio 2010 professional and I click the build solution but just 9 succeeded. Most of the 200 failed and most of the errors about tbbd.lib not found and opencv_core245d.lib not found with LNK1104 error. I'm trying to solve it for how many days. I've tried to show the ways of files... Anyone can help please? This is about my dissertation. (Build with No Common Language Support)
Collapse
I spent a good 15 hours or so to get the homework finished using OpenCV. 14.5 of those hours were spent just getting it setup properly. I ran through about 7 tutorial videos, several set up guides, and read hundreds of posts containing resolutions to the same erros I was getting.So I understand that simply installing OpenCV is not a trivial task and there are several steps to do this. So here is a straightforward tutorial for setting it up if you want to use openCV.
It is important to understand how things work as far as linking goes. There are three types of files, your headers that you include, the .dlls that contain the functions, and the libraries that contain instructions for how to call the functions in the .dlls. So here, rather than add just the .dlls as dependencies in the input linker, we are going to add the lib files. We will then create a System Environment variable that will tell the machine where to look for the .dll files when their corresponding library files are referenced. We will be creating a Property Sheet so that when we create a new project, we can simply add the settings to our project by clicking "Add Existing Property Sheet" instead of adding a new one. This way, we never have to go through this again.
FOLLOW THESE STEPS EXACTLY AND MAKE SURE VISUAL STUDIO IS CLOSED BEFORE CONTINUING
NOTE: When text is given in quotes with instructions to copy said text, do not include the quotes.
First of all, the easy part - download OpenCV 2.4.5 from their website. http://opencv.org/ and click OpenCV for Windows. It will download OpenCV 2.4.5.exe.
Install OpenCV
When the download finishes, double click OpenCV-2.4.5.exe to run it.
When asked where to extract the files, type ino the text box: "C:\"
C:\opencv should have been created upon completion. Navigate there to make sure.
Setup Environment Variables
WINDOWS 8 USERS:
- Right click the bottom left corner of your screen when the start icon pops up.
- Click "Command Prompt (Admin)"
- Type "SETX -m OPENCV_DIR C:\opencv\build" and press enter to set the opencv build directory as a System Environment Variable. Wait for the console to give you confirmation that it is set.
- Right click the bottom left corner of your screen when the "Start" icon pops up. Click System -> Advanced System Settings -> Environment Variables
- In the "System Variables" list box, under the "Variable" collumn, find "Path".
- Highlight the "Path" row and click edit.
- Click in the "Variable Value" text box and hit the "end" key on your keyboard to scroll to the end of the line and add a semicolon.
- Type the following: "C:\opencv\build\x86\vc10\bin;C:\opencv\build\x86\vc10" and click "OK". This will add the openCV bin directory to the system path.
WINDOWS 7 USERS:
Follow the same steps. The only difference is how you get to the command prompt and the system settings. Google how to set up an environment variable on Windows 7 if needed.
Setup Visial Studio
NOTE: I highly recommend VS2012 Professional because of advanced syntax highlighting that makes life so much easier when programming C++. This version can be downloaded and installed for free from DreamSpark. Just make and account with your student ID. However, the steps for VS2010 and VS2012 are the same.
Open Visual Studio
Click "New Project" and under "C++" select "Win32 Console Application".
When the window opens click "Next", check "Empty Project", and click "Finish". It is very important that you start with an EMPTY PROJECT without a precompiled header.
Locate the "Property Manager." By default, it should be a tab that is sometimes hard to miss. Alternatively it can be accessed by clicking from the toolbar "View" -> "Property Manager".
Right Click "Debug | Win32" and select "Add New Project Property Sheet". Name it "OpenCVProps" and click "Add".
Right Click your new property sheet and select "Properties".
From the left column, go to "C/C++" -> "General" and in the listbox on the right, select "Additional Include Directories" and click "Edit".
Add the following THREE directories:
"$(OPENCV_DIR)\include"
"$(OPENCV_DIR)\include\opencv"
"$(OPENCV_DIR)\include\opencv2"
From the left column, go to "Linker" -> "General" and in the listbox on the right, select "Additional Library Directories" and click "Edit".
Add the following directory:
"$(OPENCV_DIR)\x86\vc10\lib"
From the left column, go to "Linker" -> "Input" and in the listbox on the right, select "Additional Dependenies" and click "Edit".
Add the following .lib files to the depedencies. You may do this by copying and pasting these into that edit box. I have purposely not included a bulletpoint to make it easy for you to copy paste these.
opencv_core245d.lib
opencv_imgproc245d.lib
opencv_highgui245d.lib
opencv_ml245d.lib
opencv_video245d.lib
opencv_features2d245d.lib
opencv_calib3d245d.lib
opencv_objdetect245d.lib
opencv_contrib245d.lib
opencv_legacy245d.lib
opencv_flann245d.lib
NOTE: If building for release, these steps are the same. However, when copying and pasting these files, remove the 'd' from the end of each of them. The 'd' denotes that it is a release library and links to a release .dll.
Congrats! The difficult part is almost done! Click "OK" to close the Window.
Creating and Building a Test Project
Head over to our Solution Explorer. This can be focused from the toolbar via "View" -> "Solution Explorer"
Right click "Source Files" and select "Add" -> "New Item".
Select "C++ File (.cpp)" and name the file "main.cpp". Click "Add".
Copy and paste the following program and press "F7" on your keyboard and watch the bottom left corner of your screen to see if you get a "Build Succeeded" message. If so, only one step left before you compile and run! If not, please retrace your steps, or comment below and maybe I can help.
#include &ltopencv\cv.h&gt
#include &ltopencv\highgui.h&gt
int main(int argc, char* argv)
{ // openCV .image object
cv::Mat inputImage;
//Create a Window
cv::namedWindow("window",1);
// Initialize our image.
inputImage = cv::imread("Lenna.png");
// Always check to make sure that image has data.
if(inputImage.empty())
{
std::cout &lt&lt "Image Failed to Load.";
return -1;
}
else
{
// All is well, display me.
cv::imshow("window",inputImage);
// Wait for user to press a key to exit.
cvWaitKey(0);
}
return 0;
}
If the build succeeded, then all that is left is to add the image to your folder. The placement is very important. I have copied the directoy that I have placed mine in. Follow the same directory pattern.
"C:\Users\Josh\Documents\Visual Studio 2012\Projects\ConsoleApplication3\ConsoleApplication3\Lenna.png"
Now hit "Ctrl + F5" To build, compile, and run to observe your image in the window!!
*IF YOU HAVE A WEBCAM*
Copy and paste the following code to check if OpenCV is working without being required to add an image. This is useful because if the above code doesn't work, but this code does, then you know you put the image in the wrong folder.
#include
#include
int main(int argc, char* argv)
{ // openCV .image object
cv::Mat image;
//Create a Window
cv::namedWindow("window",1);
// Create the capture object.
cv::VideoCapture device;
// Open your webcam.
device.open(0);
while (1)
{
// Read data from your device and store it to the image frame.
device >> image;
// Always check to make sure that image has data.
if(image.empty())
{
std::cout&lt&lt "Image Failed to Load.";
return -1;
}
else
{
// All is well, display me.
cv::imshow("window",image);
// Wait for user to press a key to exit.
cvWaitKey(33);
}
}
return 0;
}
Happy Coding!! Let me know if something didn't work so I can fix it!
Quick Answer
I have managed to compile OpenCV with TBB support using the tutorial here.
Specs: Visual Studio 2012/ Win 7 (64 bit)/ OpenCV 2.4.5/ CUDA 5
I have downloaded the latest TBB zip and extracted it to C:/src/OpenCV/dep (as suggested in the tutorial linked above).
You have to use the following TBB settings in CMake (adapt depending on your file paths):
TBB_LIB_DIR :: C:/src/OpenCV/dep/tbb41_20130314oss/lib/intel64/vc11
TBB_INCLUDE_DIRS :: C:/src/OpenCV/dep/tbb41_20130314oss/include/
TBB_STDDEF_PATH :: C:/src/OpenCV/dep/tbb41_20130314oss/include/tbb/tbb_stddef.h
WITH_TBB :: checked
BUILD_TBB :: unchecked
More Information
Initially, I also wanted to install OpenCV with CUDA 5 support, but it seems that CUDA 5 is incompatible with VS2012. This is the error I got when compiling
OpenCV:
Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj
nvcc : fatal error : nvcc cannot find a supported cl version. Only MSVC 9.0 and MSVC 10.0 are supported
The good news is that you are using VS2010, which can be used with CUDA, as suggested here.
VS2012 can be set up to create projects with CUDA, but there is currently no way (AFAIK) to compile OpenCV with CUDA support for VS2012 (read this for more info).
In conclusion, people that need CUDA support should compile and use OpenCV with VS2010.
Also, when compiling OpenCV, I got the following errors:
error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm118' or greater
fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
I used the instructions here to finally compile OpenCV. I created a Property Sheet which had /Zm130 as an additional option in Common Properties > C/C++ > Command Line and added it
to all of the generated OpenCV projects.
For your reference, I also attach the CMake configuration and CMakeCache.txt file that I've used (CUDA is disabled as I am using VS2012):
CMake configuration: http://pastebin.com/8rJZGZ3T
CMakeCache.txt: http://pastebin.com/A0q8YgJg
Hope this helps and please comment if you need me to elaborate on any step.
I installed again opencv-master, opencv-2.4.5 and opencv-2.4.7 both to my new laptop. OpenCV-2.4.7's imread function returned always null but C-cvImageLoad worked well and opencv-master's cvLoadImage didn't work cvImageLoad or I missed something. But TBB's dir must be .../bin/ia32 not intel64 my OS is 64-bit but VS201x 32-bit this was my error. And I've get stitching and gpu errors and visual studio is telling about the error and this is usually memory allocation limit error and I did same things like your said #dilgenter and now it's working well but just 2.4.5 well and the python_d.lib error can be occur this is not a problem at debug mode I've read about this from a lot of forum sites. I'll try to find why 2.4.7's imread returning null Mat element. But now I'm too busy and this is

How to open source file in IDE on a certain line through command line

I'm just wondering if there is some IDE command line parameter which would open a source file on a specified line (in the current view) ?
I know this is probably too much to publish as a command line parameter, but it would be great for my Assert logging system; I would just create a link (label or something) and through this link open the file on the line where the assertion has happened.
The only thing I found is the registry entry (valid for Delphi 2007)
Key:
HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Closed Files\
Value:
TSourceModule,'<FilePath>',0,<PositionX>,<PositionY>,<CursorX>,<CursorY>,0,0,,
Where:
<FilePath> - the full file path
<PositionX> - first visible char in horizontal scope
<PositionY> - first visible char in vertical scope
<CursorX> - cursor position in horizontal scope
<CursorY> - cursor position in vertical scope
The rest of this key value I don't know but it might be enough to create this key and open the file.
Thanks
Following discussion in the comments to the question, it appears that you would be satisfied with writing a small utility to generate a fake .dsk file (desktop file) and possibly a matching fake .dproj file (project file). The .dsk file would contain just enough information to trick the IDE into opening the required file and moving to the desired location within that file.

Resources