I have the following issue in OpenCV: I have built the openCV libraries with CMake and compiled the OpenCV solution and the corresponding .pdb files were generated. I have a project that uses OpenCV library and I want to step into a function(cvStereoRectify) that crashes. I have included the symbols in my project (the folder were .pdb files are located) and when it hits the breakpoint at that function and I hit "Step Into" the error is generated and it doesn't go into the OpenCV source function. At runtime, the Modules window shows that opencv_calib3d.dll (and others opencv_*.dll) says that "Cannot find or open the PDB file".
Can someone show me the right way to do this ??
Thanks in advance,
Tamash
In order to step into openCV code you have to copy the pdb and the dll files to the location of your project.
in order to do so , go to your project properties , on the post build step type the lines:
copy "C:\OpenCV2.31\CMake_Build\bin\Debug\*.dll"
copy "C:\OpenCV2.31\CMake_Build\bin\Debug\*.pdb"
If that doesn't work , you'll have to include the *h and *cpp directories of the openCV library on your project setting:
On additional include directories type :
C:\OpenCV2.3\infustracture\Dienet;C:\OpenCV2.31\opencv\build\include;C:\OpenCV2.31\opencv\build\include\opencv;C:\OpenCV2.31\opencv\build\include\opencv2;%(AdditionalIncludeDirectories)
Good luck
Related
I am running into a strange issue with including libraries in the lib folder.
Project details:
ESP32 with Arduino Framework
Trying to get the Adafruit HX8357D LCD to work
What I have done:
Please see the picture attached. I have included all the libraries that I should need. When I compile I run into the "No such file or directory error. I have clearly included the "Adafruit_I2CDevice.h" file in the lib folder under its master folder. But the compiler does not see it. Why?
If I move all the .h and .cpp files in the Adafruit_BusIO-master folder to Adafruit_GFC-Librari-master folder then the "fatal error: Adafruit_I2CDevice.h no such..." error just changes to a different file that is located in the lib folder.
This means there is a deeper issue here with the linker.
Does anyone know why it is doing this? I have not in the past had issues with including files located in the lib folder into various other sources.
Any help would be great.
Thank you
I use TFT_eSPI by Bodmer for Adafruit HX8357D. I use the following command to install the lib in my project and it does all th taff.
pio lib install "bodmer/TFT_eSPI#^2.3.64"
In your case have a look to c_cpp_properties.json in .vscode of your projet to be sure that the "includePath" and "path" points to the good include directories.
From the home screen of PlatformIO, you will have to go to the libraries section and search for your desired libraries there, assigning libraries to your desired libraries from there. Only then it will work properly.
If your libraries are successfully added, they should be inside the .pio\libdeps of your project directory.
I am new to programming and I am trying to use SDL library with Code::Blocks on Windows. I downloaded the Library from : https://www.libsdl.org/download-2.0.php.
I downloaded the files, decompressed and then copied SDL.dll file in
C:\Program Files (x86)\CodeBlocks\MinGW\bin
and then the include and lib files in
C:\Program Files (x86)\CodeBlocks\SDL,
which is a new file I created. However, when I open Code::Blocks, new SDL project and arrive at the step where I am supposed to give the directory where the include and lib files are, once I hit next I get the following error :
The path you entered seems valid but the wizard can't locate the following SDL's library file: SDLmain in it.
Any idea why this might be happening and how I can fix it?
For my thesis I want to use Dlib's face_landmark_detection, but I keep running into these errors (for both Visual studio 2013 as well as 2015):
"cannot open include file: 'zlib.h': No such file or directory"
and
"'F77_INT': undeclared identifier".
It repeats itself so I have 36 errors based on these two problems.
My supervisor has given me some steps to follow to set up the project:
add dlib-master and dlib-master\examples to VC++ directories -> include directories
add dlib-master\dlib\external\libjpeg and dlib-master\dlib\entropy_decoder to C/C++ -> General -> Additional include directories
add all folders and items from dlib-master\dlib\external (cblas, libjpeg, libpng and zlib) to the project source folder
add the dlib source file (from dlib-master\dlib\all) and add face_landmark_detection (from dlib-master\examples) to the project source folder.
and according to him this has worked on every other computer so far, but on my laptop it just won't. We checked to project, but zlib.h is in the zlib folder in the project. Does anyone here have an idea on what might be going wrong?
If I didn't give enough info, please ask. I don't know what else might be needed to solve this.
I have just come about this same problem and wanted to post my solution since I have found so much conflicting documentation on the subject.
The folder containing the dlib folder as well as the libpng, libjpeg, and zlib folders from dlib/external need to be added to the additional include directories list in the solution settings.
dlib/all/source.cpp as well as the source files for libpng, libjpeg, and zlib also need to be added to the project.
Note that CBLAS should not be added to the project in any way, because it needs Fortran to compile, and it is very difficult to get this to compile from Visual Studio.
Finally, make sure to add DLIB_PNG_SUPPORT and DLIB_JPEG_SUPPORT as preprocessor defines in the project settings.
I also attempted to use a cmake generated solution, however, for some reason it had trouble with png support.
It is probably easiest to use CMake to configure your project which uses dlib. It avoids setting all those paths manually. During CMake configure step you can disable usage of libraries like zlib which you don't have/want/need. Here is an example CMakeLists.txt which works for me:
cmake_minimum_required(VERSION 2.6)
PROJECT(DatasetClassifier CXX C)
set(dlib_DIR "" CACHE PATH "Path to dlib") # http://dlib.net/
include(${dlib_DIR}/dlib/cmake)
ADD_EXECUTABLE(DatasetClassifier DatasetClassifier.cpp)
TARGET_LINK_LIBRARIES(DatasetClassifier ${dlib_LIBRARIES})
This is my first test using Boost (1.5.3). I made an example with FileSystem class.
I think I've installed successfully the binary distribution, i.e., run bootstrap.bat and b2.exe to create headers & libraries in the installed folder.
if I'm correct, there is no dll lib, just static libraries & header files which I've pointed to in VS2008 project configuration.
I go compile and got this:
Error 1 fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_53.obj' test_filesystem test_filesystem
what type of error is this? I think the compiler already sees the required files & libs
Thanks
Edit 01:
I originally added the wrong lib name (lack of ".lib"), I've correted it but now it gets
"Error 15 fatal error LNK1104: cannot open file 'libboost_filesystem-vc90-mt-gd-1_53.lib' test_filesystem test_filesystem"
Do I put the library name correctly? -> libboost_filesystem-vc90-mt-gd-1_53.lib? I normally put library name like this, and I'm sure I've added the right path to this static lib
Ok,
I've now solved the problem. Partly, it is from the hint "boost links itself"
I installed boost 1.5.3 which includes all "libxx-vc100-xx-1_53.lib" and these libs are intended to use for VS2010 (vc10) compiler.
I didn't notice this and compiled my example in VS2008 (vc9) and boost/compiler something links automatically to vc9 libraries which are not available.
=> I solved it by compiling the same project in VS2010 and finally DONE
I've followed the directions here:
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Setting+Up+An+Application+-+CodeBlocks
then I get this error:
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lOgreMain_d.dll
I have OgreMain, OIS, OgreMain_d, OIS_d placed within my project folder. How can I fix this? :(
This could happen primarily due to two reasons.
The dll has not yet been compiled and created.
In the linker settings, the dll search path or the dll name to link against is wrong.
Please check if the OgreMain_d.dll has been created in the OGRE bin folder and if so, confirm the linker search settings. Also confirm that the project is not in release build configuration, as the created dll would then be OgreMain.dll.