I'm trying to build a driver with Microsoft Dmf Framework https://github.com/microsoft/DMF
I builded Dmf from the provided sln file in this repository. It results in DmfK.lib (I build a kernel mode driver), then I add this lib to my driver project.
But I have 27 times the same linker error "unresolved external symbol WppAutoLogTrace" from different functions of this lib, ie:
Error LNK2019 unresolved external symbol WppAutoLogTrace referenced in function "long __cdecl HashTable_ContextInitialize(struct DMFMODULE__ *)" (?HashTable_ContextInitialize##YAJPEAUDMFMODULE__###Z) Main (Main\Main) C:\Data\Development\MyDriver\Source\Main\DmfK.lib(Dmf_HashTable.obj)
I found no relevant information about this function over the internet, I can't figure out which other lib to include. Is this a problem with a missing lib or an issue with the DmfK.lib build ?
I finally found the solution:
WppAutoLogTrace is implemented in WppRecorder.lib
Related
I need to build OpenCV from source, because I want to make modifications to it. So using pre-built binaries is not an option for me. I'm doing this on Windows 8. I do not have MS Visual Studio, and I don't want to use it.
Here is how I reproduce the build error:
I git clone https://github.com/opencv/opencv
I use CMake 3.7.1, press Configure, then press Generate. It seems to work (no errors). I named the output folder opencv/release.
I go to the opencv/release folder, and type mingw32-make.
Eventually, after compiling for a while, it displays the following error message:
Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.obj
modules\core\src\parallel.cpp:135:43: error: operator '&&' has no right operand
modules\core\src\parallel.cpp: In function 'void cv::parallel_for_(const cv::Range&, const cv::ParallelLoopBody&, double)':
modules\core\src\parallel.cpp:311:52: error: 'parallel_for_pthreads' was not declared in this scope parallel_for_pthreads(range, body, nstripes);
^
modules\core\src\parallel.cpp: In function 'int cv::getNumThreads()':
modules\core\src\parallel.cpp:370:50: error: 'parallel_pthreads_get_threads_num' was not declared in this scope return parallel_pthreads_get_threads_num();
^
modules\core\src\parallel.cpp: In function 'void cv::setNumThreads(int)':
modules\core\src\parallel.cpp:431:46: error: 'parallel_pthreads_set_threads_num' was not declared in this scope parallel_pthreads_set_threads_num(threads);
^
modules\core\CMakeFiles\opencv_core.dir\build.make:990: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.obj' failed mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.obj] Error 1
Note: I tried to compile both with and without TPP (in the CMake config), and I get the same error message.
Also, I read the other similar questions on StackOverflow and the answers do not help.
I am trying to compile a program which uses opencv. I have included the opencv.hpp file in the .h and the .c file which needs the opencv functions. The project also has the properties set to use opencv. I am using 2.4.5 version of opencv. The problems I am facing is that after including these files in the project the project fails to compile. I get an error saying I have failed to #inlcude "stdafx.h". This is because I am using precompiled headers and #include"stdafx.h" has to be the first line of code in that .c or .cpp file. If I add the inclusion of stdafx.h tehn the program compiles but it does not link.
shown below is how i have included the files in the .c file.
**
include "../stdafx.h"
include "C:\opencv\include\opencv2\opencv.hpp"
include "DPD_AlgorithmInit.h"
**
and shown below is the inclusion in the .h file
include "C:\opencv\build\include\opencv2\core\types_c.h"
the error I am receiving is
error C1083: Cannot open source file: '..\MOSS\PedestrianDetection\DPD_Tracker.c': No such file or directory C:\Users\sankalp\Desktop\check\MOSS_Evaluation\c1 error LNK2001: unresolved external symbol _InitializeTracker C:\Users\sankalp\Desktop\check\MOSS\DPD_AlgorithmInit.obj error LNK2001: unresolved external symbol _DPD_Tracker C:\Users\sankalp\Desktop\check\MOSS\DPD_AlgorithmInit.obj error LNK2001: unresolved external symbol "unsigned char * __cdecl DPD_Alloc(unsigned int)" (?DPD_Alloc##YAPAEI#Z) C:\Users\sankalp\Desktop\check\MOSS\DPD_Tracker1.obj error LNK1120: 3 unresolved externals C:\Users\sankalp\Desktop\check\Release\MOSS.exe
Am I doing something wrong while including the .hpp file? Is there a better way to include opencv to allow compilation and linking? I have tried toggling the precompiled header usage settings in the project too but It did not help.
I am getting the following error when compiling opencv with ffmpeg.
..../arm-none-linux-gnueabi/bin/ld: ../../bin/opencv_test_core: hidden symbol `__sync_val_compare_and_swap_4' in ..../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
I have no idea what this means. How do I fix this?
Edit:
I am cross compiling for ARM using codesourcery's arm-2009q3 compiler.
I using cmake and make to compile.
Please check all the libraries that you use and go through this stackoverflow thread as well.
To me, I got the below error when I migrated my product to new GCC version (3.3.3 to 4.5.4)
hidden symbol `__clz_tab' in /../lib/gcc/mipsel-unknown-linux-uclibc/4.5.4/libgcc.a(_clz.o) is referenced by DSO
Later I found that one of the library that I tried to link was built using GCC 3.3.3. After building the other library under GCC 4.5.4, the 'hidden symbol' error disappeared.
I am trying to run the opencv surf implementation here in VS 2013.
I've already arranged the libraries in Linker->Input for example opencv_core246.lib for release and opencv_core246d.lib for debug.
But when I try to run the program, I getting the following error:
Error 1 error LNK2001: unresolved external symbol "public: __thiscall
cv::SIFT::SIFT(int,int,double,double,double)"
(??0SIFT#cv##QAE#HHNNN#Z) C:...\Documents\Visual Studio
2013\Projects\surftest\surftest\main.obj surftest
I already googled this error but found nothing useful.
Is there anyone knowing the reason for this error? Thanks in advance.
You need to link it with
opencv_features2d246d.lib
opencv_nonfree246d.lib
for debug and for release
opencv_features2d246.lib
opencv_nonfree246.lib
Following this link. I am stuck in the last two steps during setting up my workstation.
As a compiler I use Code:Block MinGW; I have already generated the compiled opencv files, now I need to build the sln file in Windows. I use Code Block to build this OpenCV Project File in the path D:\OpenCV\Build\Opencv, where I put the generated bin file after using Cmake.
During the building, it stopped at 40%, saying;
Linking CXX executable ....\bin\opencv_perf_core.exe
c:/codeblock/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe:
warning: auto-importing has been activated without
--enable-auto-import specified on the command line. This should work unless it involves constant data structures referencing symbols from
auto-imported DLLs. Cannot export _ZN12_GLOBAL__N_13ROp3allEv: symbol
not found Cannot export _ZN12_GLOBAL__N_17CmpType3allEv: symbol not
found collect2: ld returned 1 exit status mingw32-make.exe[2]: *
[bin/opencv_perf_core.exe] Error 1 mingw32-make.exe1: *
[modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
mingw32-make.exe: * [all] Error 2 Info: resolving vtable for
cv::_OutputArray by linking to imp_ZTVN2cv12_OutputArrayE
(auto-import) Info: resolving vtable for cv::_InputArray by linking to
imp_ZTVN2cv11_InputArrayE (auto-import) Info: resolving vtable for cv::Exception by linking to imp_ZTVN2cv9ExceptionE (auto-import)
Creating library file: ....\bin\libopencv_perf_core.dll.a Process
terminated with status 2 (14 minutes, 29 seconds) 0 errors, 3 warnings
How can I solve this problem?
Unfortunately, there's not much you can do, according to http://code.opencv.org/issues/2523.
You will have to use a recent version of MinGW. It builds fine using the latest MinGW shipping with GCC 4.7.2.
This issue seems to have been introduced in OpenCV 2.4.3 as it is said version 2.4.2 builds fine.