Try compile. Get error. What his need?
[ 62%] Linking CXX shared library ....\bin\libopencv_superres310d.dll
Info: resolving vtable for cv::ParallelLoopBody by linking to __imp___ZTVN2cv16P
arallelLoopBodyE (auto-import)
Info: resolving vtable for cv::VideoCapture by linking to __imp___ZTVN2cv12Video
CaptureE (auto-import)
Creating library file: ....\lib\libopencv_superres310d.dll.a
c:/qt/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.e
xe: warning: auto-importing has been activated without --enable-auto-import spec
ified on the command line.
This should work unless it involves constant data structures referencing symbols
from auto-imported DLLs.
Cannot export _ZN2cv3Mat3ptrIN12_GLOBAL__N_18_Point4fEEEPT_i: symbol not found
collect2: ld returned 1 exit status
mingw32-make[2]: * [bin/libopencv_superres310d.dll] Error 1
mingw32-make[1]: * [modules/superres/CMakeFiles/opencv_superres.dir/all] Error
2
mingw32-make: *** [all] Error 2
the first problem is your function with computer when you use opencv3. 1, opencv3. 1 Newest operating systems are supported: Windows 10 and OSX 10.11 (Visual Studio 2015 and XCode 7.1.1), the function can't use old computer try with old version opencv
Related
I'm currently working on a game engine with vulkan.
I just wanted to try whether it compiles on linux, but I don't know how to link my Vulkan SDK libraries. I downloaded the "vulkansdk-linux-x86_64-1.1.85.0.tar.gz" from the LunarG homepage, but now I dont know what I should link under "target_link_libraries".
I tried to link the "libvulkan.so" from the lib folder, but it does not work.
Some help from you would be great, because I never worked with CMAKE on linux.
/usr/bin/ld: cannot find -lvulkan
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/Untitled.dir/build.make:669: ../output_linux /Untitled] Error 1
make[2]: *** [CMakeFiles/Makefile2:73: CMakeFiles/Untitled.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/Untitled.dir/rule] Error 2
make: *** [Makefile:118: Untitled] Error 2
Thanks for help,
Marlon
The SDK's Linux Getting Started Guide found in your SDK tarball and at this link explains much of this. In fact, there's even a section called "Using Vulkan in CMake Projects" that shows how to use the FindVulkan CMake module. The SDK also contains numerous example programs, also built with CMake.
When I tried to compile example from Anvil framework for Vulkan I get following errors:
[ 97%] Linking CXX executable OutOfOrderRasterization
/usr/bin/ld: cannot find -lvulkan
collect2: error: ld returned 1 exit status
CMakeFiles/OutOfOrderRasterization.dir/build.make:126: recipe for target 'OutOfOrderRasterization' failed
make[2]: *** [OutOfOrderRasterization] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/OutOfOrderRasterization.dir/all' failed
make[1]: *** [CMakeFiles/OutOfOrderRasterization.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
How i need to configure Vulkan to resolve it? (Ubuntu)
Check you LIBRARY paths. You might need to download and install vulkan. There should a .so file in one your library paths(/usr/lib{,64},/lib{,64}, /usr/share/lib{,64}) named to the effect of libvulkan.numbers.so.
See this ask ubuntu question: https://askubuntu.com/questions/796442/ld-cannot-find-lvulkan
CMake versions 3.7 and later ship with a FindVulkan.cmake module that finds the Vulkan includes and library for you if you have a Vulkan SDK installed and the VULKAN_SDK environment variable set. The CMake module also finds the includes and library if you have installed a Vulkan package to your system directories. The Getting Started guide on the LunarXchange website has some additional detail.
I'm trying to compile ROS (Robot Operating System) on a Raspberry Pi (Raspbian) following these instructions and got to the point to compile ROS, which fails at compiling opencv with undefined reference to 'header':
[ 97%] Built target opencv_videostab
[ 98%] Built target opencv_haartraining_engine
Linking CXX executable ../../bin/opencv_createsamples
../../lib/libopencv_highgui.so.2.4.6: undefined reference to `header'
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_createsamples] Error 1
make[1]: *** [apps/haartraining/CMakeFiles/opencv_createsamples.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'opencv2':
Command '/home/ilagi/ros_catkin_ws/install_isolated/env.sh make -j1 -l1' returned non-zero exit status 2
I googled to try to figure out what header file might be missing, but unfortunately didn't get anywhere.
I hope somebody will have an idea about at least the directions to go from here.
Thanks
I guess I'm going to answer my own question. I don't exactly know which dependency caused this particular error, but I had recompiled ffmpeg based on the instructions provided at http://ariandy1.wordpress.com/2013/02/13/raspberry-pi-rasbian-opencv/ and now I managed to get ROS to compile opencv.
I have the following problem. On my Ubuntu I try to build a project and receive the following linker error(s) so far:
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libboost_thread.a(once.o): undefined reference to symbol 'pthread_once##GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO
missing from command line collect2: error: ld returned 1 exit status
make[2]: *** [sunprint] Error 1 make[1]: ***
[CMakeFiles/sunprint.dir/all] Error 2 make: *** [all] Error 2
*** Failure: Exit code 2 ***
I'm running under ubuntu 13 desktop, GCC 4.8, boost ver. is 1.54. As an IDE I'm working with
is the KDevelop.
I can provide any additional info about this issue if needed, but now I'm stuck with
this linking problem.
Any ideas?
Thanx in advance.
add_definitions only adds inputs for the preprocessor, which is in action even before the compiler starts its business and even much farther away from linking the executable, the step ld is supposed to be doing.
What you want to have ld resolve link-time dependencies is the CMake command target_link_libraries, which, for a given target, add a number of libs to link against after compilation.
In you case, the appropriate invocation could look like this
target_link_libraries(${PROJECT_NAME} [...] -lpthread [...]) #obviously without the '[...]' and the correct target name
I had a similar problem but with mpich. Both:
target_link_libraries(${PROJECT_NAME} [...] -lmpich [...])
and
target_link_libraries(${PROJECT_NAME} [...] mpich [...])
worked properly.
I'm using mingw-w64 (4.8.0) + cmake to build shared libraries for yaml-cpp (0.5.1). The project has a few build targets in the CMakeLists.txt that comes with it: the main library yaml-cpp and some test programs e.g. parse, which links the library.
The library target yaml-cpp itself built without error but it is followed by this error when parse is built:
Linking CXX executable parse.exe
CMakeFiles\parse.dir/objects.a(parse.cpp.obj):parse.cpp:(.text+0x1a3): undefined reference to `YAML::Load(std::istream&)'
CMakeFiles\parse.dir/objects.a(parse.cpp.obj):parse.cpp:(.text+0x1b2): undefined reference to `YAML::operator<<(std::ostream&, YAML::Node const&)'
c:/work/mingw64-4.8/bin/../lib/gcc/x86_64-w64-mingw32/4.8.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\parse.dir/objects.a(parse.cpp.obj): bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
util\CMakeFiles\parse.dir\build.make:90: recipe for target 'util/parse.exe' failed
mingw32-make[3]: *** [util/parse.exe] Error 1
CMakeFiles\Makefile2:228: recipe for target 'util/CMakeFiles/parse.dir/all' failed
mingw32-make[2]: *** [util/CMakeFiles/parse.dir/all] Error 2
CMakeFiles\Makefile2:240: recipe for target 'util/CMakeFiles/parse.dir/rule' failed
mingw32-make[1]: *** [util/CMakeFiles/parse.dir/rule] Error 2
makefile:211: recipe for target 'parse' failed
mingw32-make: *** [parse] Error 2
I run into similar errors when I try to write small test programs using the library, and I don't know what is wrong. What might be the issue here?
Jesse Beder's comment points to the exact issue causing the error described in the question. A quick fix while this gets fixed in a follow-up release is to apply the patch (https://code.google.com/p/yaml-cpp/issues/detail?id=216#c4) to a clean copy of yaml-cpp 0.5.1. There is also a line that declares std::string node_data::empty_scalar in the source file src/node_data.cpp that should be commented out. After making these changes, the shared libraries and utilities build without error.