Problems with linking CEF3 - c++

I'm having some problems with using CEF in my application which uses the MD/MDd runtime library linking.
I have downloaded the latest build of CEF3 from cefbuilds.com and followed the instructions How to link CEF against a different run-time library.
I have built the "libcef_dll_wrapper" project after changing "Runtime Library" to "/MDd" and "Platform Toolset" to "v110" and then I've linked the resulting "libcef_dll_wrapper.lib" binary to my project.
However, when I try to build my project I get the following errors:
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol _cef_string_utf16_clear referenced in function "public: static void __cdecl CefBrowserSettingsTraits::clear(struct _cef_browser_settings_t *)" (?clear#CefBrowserSettingsTraits##SAXPAU_cef_browser_settings_t###Z)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol _cef_string_utf8_to_utf16 referenced in function "public: static bool __cdecl CefStringTraitsUTF16::from_string(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct _cef_string_utf16_t *)" (?from_string#CefStringTraitsUTF16##SA_NABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PAU_cef_string_utf16_t###Z)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol _cef_string_list_free referenced in function "public: static void __cdecl CefSettingsTraits::clear(struct _cef_settings_t *)" (?clear#CefSettingsTraits##SAXPAU_cef_settings_t###Z)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol "public: static bool __cdecl CefBrowser::CreateBrowser(class CefWindowInfo &,class CefRefPtr<class CefClient>,class CefStringBase<struct CefStringTraitsUTF16> const &,class CefStructBase<struct CefBrowserSettingsTraits> const &)" (?CreateBrowser#CefBrowser##SA_NAAVCefWindowInfo##V?$CefRefPtr#VCefClient####ABV?$CefStringBase#UCefStringTraitsUTF16####ABV?$CefStructBase#UCefBrowserSettingsTraits#####Z) referenced in function "public: void __thiscall caspar::html::html_producer::run(void)" (?run#html_producer#html#caspar##QAEXXZ)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol "bool __cdecl CefInitialize(class CefStructBase<struct CefSettingsTraits> const &,class CefRefPtr<class CefApp>)" (?CefInitialize##YA_NABV?$CefStructBase#UCefSettingsTraits####V?$CefRefPtr#VCefApp#####Z) referenced in function "public: void __thiscall caspar::html::html_producer::run(void)" (?run#html_producer#html#caspar##QAEXXZ)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_execute_process referenced in function "int __cdecl CefExecuteProcess(class CefMainArgs const &,class CefRefPtr<class CefApp>)" (?CefExecuteProcess##YAHABVCefMainArgs##V?$CefRefPtr#VCefApp#####Z)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_initialize referenced in function "bool __cdecl CefInitialize(class CefMainArgs const &,class CefStructBase<struct CefSettingsTraits> const &,class CefRefPtr<class CefApp>)" (?CefInitialize##YA_NABVCefMainArgs##ABV?$CefStructBase#UCefSettingsTraits####V?$CefRefPtr#VCefApp#####Z)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_shutdown referenced in function "void __cdecl CefShutdown(void)" (?CefShutdown##YAXXZ)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_do_message_loop_work referenced in function "void __cdecl CefDoMessageLoopWork(void)" (?CefDoMessageLoopWork##YAXXZ)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_run_message_loop referenced in function "void __cdecl CefRunMessageLoop(void)" (?CefRunMessageLoop##YAXXZ)
The full log can be found here.
Any ideas as to what I might be missing?

Are you also libcef.lib in the linker input?

Related

Unresolved External Symbol errors while using Catch2

I am trying to do Catch2 Unit Testing in Visual Studio. I have created a small test project to practice. When I try to compile this test project, I get a linker error. I am now trying to diagnose this linker error, but the Catch2.hpp header file contains thousands of lines of code. My hope is that someone who is more familiar with Catch2 or unit testing in general can diagnose what the issue is.
I will describe the process by which I created this project. I created a new project in a new solution. I have 4 files, all in the same directory, listed below.
The class I want to test:
//a.h
#pragma once
class A {
friend int A_Tester_Func1(A a);
public:
A(int num) : my_num_(num) {
}
private:
int my_num_;
};
The test:
//atester.cpp
#pragma once
#include "catch.hpp"
#include "a.h"
int A_Tester_Func1(A a) {
return a.my_num_;
}
TEST_CASE("a contains a positive integer", "[a]") {
//...
A a(3);
REQUIRE(A_Tester_Func1(a) == 3);
}
The main function that runs the tests:
//tester.cpp
#define CATCH_CONFIG_MAIN
#include "catch.hpp" // this should create the main function
The Catch2 Testing Framework:
// catch.hpp
/*
* Catch v2.13.2
* Generated: 2020-10-07 11:32:53.302017
*/
//~17-18k lines of code that from Catch2
#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED
When I try to compile this code in Visual Studio using the Local Windows Debugger button, I get a bunch of Unresolved External Symbol linker errors. I believe I read somewhere that Catch2 is "partially compiled." That may have something to do with it, but I don't know. Following this guide (StackOverflow: Best practices for Unit testing with Catch2 in Visual Studio) has worked for me, but I'm trying to understand why the small example above is not successfully linking.
I have included the linker errors below for completeness, although I feel that they will probably not be necessary for the question.
1>atester.obj : error LNK2019: unresolved external symbol "public: __thiscall Catch::StringRef::StringRef(char const *)" (??0StringRef#Catch##QAE#PBD#Z) referenced in function "public: class Catch::BinaryExpr<int const &,int const &> const __thiscall Catch::ExprLhs<int const &>::operator==<int>(int const &)" (??$?8H#?$ExprLhs#ABH#Catch##QAE?BV?$BinaryExpr#ABHABH#1#ABH#Z)
1>atester.obj : error LNK2019: unresolved external symbol "struct Catch::ITestInvoker * __cdecl Catch::makeTestInvoker(void (__cdecl*)(void))" (?makeTestInvoker#Catch##YAPAUITestInvoker#1#P6AXXZ#Z) referenced in function "void __cdecl `anonymous namespace'::`dynamic initializer for 'autoRegistrar1''(void)" (??__EautoRegistrar1#?A0xf9ca9c7d##YAXXZ)
1>atester.obj : error LNK2019: unresolved external symbol "public: __thiscall Catch::NameAndTags::NameAndTags(class Catch::StringRef const &,class Catch::StringRef const &)" (??0NameAndTags#Catch##QAE#ABVStringRef#1#0#Z) referenced in function "void __cdecl `anonymous namespace'::`dynamic initializer for 'autoRegistrar1''(void)" (??__EautoRegistrar1#?A0xf9ca9c7d##YAXXZ)
1>atester.obj : error LNK2019: unresolved external symbol "public: __thiscall Catch::AutoReg::AutoReg(struct Catch::ITestInvoker *,struct Catch::SourceLineInfo const &,class Catch::StringRef const &,struct Catch::NameAndTags const &)" (??0AutoReg#Catch##QAE#PAUITestInvoker#1#ABUSourceLineInfo#1#ABVStringRef#1#ABUNameAndTags#1##Z) referenced in function "void __cdecl `anonymous namespace'::`dynamic initializer for 'autoRegistrar1''(void)" (??__EautoRegistrar1#?A0xf9ca9c7d##YAXXZ)
1>atester.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Catch::AutoReg::~AutoReg(void)" (??1AutoReg#Catch##UAE#XZ) referenced in function "void __cdecl `anonymous namespace'::`dynamic atexit destructor for 'autoRegistrar1''(void)" (??__FautoRegistrar1#?A0xf9ca9c7d##YAXXZ)
1>atester.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Catch::StringMaker<int,void>::convert(int)" (?convert#?$StringMaker#HX#Catch##SA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##H#Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Catch::Detail::stringify<int>(int const &)" (??$stringify#H#Detail#Catch##YA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##ABH#Z)
1>atester.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Catch::ITransientExpression::~ITransientExpression(void)" (??1ITransientExpression#Catch##UAE#XZ) referenced in function "public: virtual __thiscall Catch::BinaryExpr<int const &,int const &>::~BinaryExpr<int const &,int const &>(void)" (??1?$BinaryExpr#ABHABH#Catch##UAE#XZ)
1>atester.obj : error LNK2019: unresolved external symbol "void __cdecl Catch::formatReconstructedExpression(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Catch::StringRef,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?formatReconstructedExpression#Catch##YAXAAV?$basic_ostream#DU?$char_traits#D#std###std##ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##3#VStringRef#1#1#Z) referenced in function "private: virtual void __thiscall Catch::BinaryExpr<int const &,int const &>::streamReconstructedExpression(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?streamReconstructedExpression#?$BinaryExpr#ABHABH#Catch##EBEXAAV?$basic_ostream#DU?$char_traits#D#std###std###Z)
1>atester.obj : error LNK2019: unresolved external symbol "public: __thiscall Catch::AssertionHandler::AssertionHandler(class Catch::StringRef const &,struct Catch::SourceLineInfo const &,class Catch::StringRef,enum Catch::ResultDisposition::Flags)" (??0AssertionHandler#Catch##QAE#ABVStringRef#1#ABUSourceLineInfo#1#V21#W4Flags#ResultDisposition#1##Z) referenced in function "void __cdecl ____C_A_T_C_H____T_E_S_T____0(void)" (?____C_A_T_C_H____T_E_S_T____0##YAXXZ)
1>atester.obj : error LNK2019: unresolved external symbol "public: void __thiscall Catch::AssertionHandler::handleExpr(struct Catch::ITransientExpression const &)" (?handleExpr#AssertionHandler#Catch##QAEXABUITransientExpression#2##Z) referenced in function "void __cdecl ____C_A_T_C_H____T_E_S_T____0(void)" (?____C_A_T_C_H____T_E_S_T____0##YAXXZ)
1>atester.obj : error LNK2019: unresolved external symbol "public: void __thiscall Catch::AssertionHandler::handleUnexpectedInflightException(void)" (?handleUnexpectedInflightException#AssertionHandler#Catch##QAEXXZ) referenced in function __catch$?____C_A_T_C_H____T_E_S_T____0##YAXXZ$0
1>atester.obj : error LNK2019: unresolved external symbol "public: void __thiscall Catch::AssertionHandler::complete(void)" (?complete#AssertionHandler#Catch##QAEXXZ) referenced in function __catch$?____C_A_T_C_H____T_E_S_T____0##YAXXZ$0
1>MSVCRTD.lib(exe_main.obj) : error LNK2019: unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main##YAHXZ)
What is causing these errors? How do I fix these errors while keeping catch.hpp in the same project as my source files?
In a .cpp file, add this to make the project a Catch2 test runner:
#define CATCH_CONFIG_RUNNER
#include "catch.hpp"
Read more at Supplying main() yourself
I ran into the same problem.
You need to keep #define CATCH_CONFIG_MAIN in the first line of the file, especially before other #include.
atester.cpp must not have the #pragma once directive. It's for header files, and while it may not be your source of trouble, it simply doesn't belong. Since you're not providing enough detail (namely: where's the minimized project file?), I have to be conservative here.
It seems that tester.cpp is not part of the project that you're building. Just because it's a file that exists on disk doesn't mean it's automatically picked up. You have to manually add it to the MSVC project. That's all there's to it. I use Catch2 with MSVS all the time and that's all it takes to make it work.

Static QT unresolved external symbol

I've been trying to build using static qt for a while but i can't get rid of these errors .
<QtGuiApplication4> (29 items)
Error LNK2019: unresolved external symbol _FT_New_Face referenced in function "public: static class QStringList __cdecl QBasicFontDatabase::addTTFile(class QByteArray const &,class QByteArray const &)" (?addTTFile#QBasicFontDatabase##SA?AVQStringList##ABVQByteArray##0#Z)
Error LNK2019: unresolved external symbol _FT_Get_PS_Font_Info referenced in function "public: bool __thiscall QFontEngineFT::init(struct QFontEngine::FaceId,bool,enum QFontEngine::GlyphFormat,class QFreetypeFace *)" (?init#QFontEngineFT##QAE_NUFaceId#QFontEngine##_NW4GlyphFormat#3#PAVQFreetypeFace###Z)
Error LNK2019: unresolved external symbol _FT_Load_Sfnt_Table referenced in function "bool __cdecl ft_getSfntTable(void *,unsigned int,unsigned char *,unsigned int *)" (?ft_getSfntTable##YA_NPAXIPAEPAI#Z)
Error LNK2019: unresolved external symbol _FT_GlyphSlot_Oblique referenced in function "public: virtual void __thiscall QFontEngineFT::addGlyphsToPath(unsigned int *,struct QFixedPoint *,int,class QPainterPath *,class QFlags<enum QTextItem::RenderFlag>)" (?addGlyphsToPath#QFontEngineFT##UAEXPAIPAUQFixedPoint##HPAVQPainterPath##V?$QFlags#W4RenderFlag#QTextItem#####Z)
Error LNK2019: unresolved external symbol _FT_GlyphSlot_Embolden referenced in function "public: virtual void __thiscall QFontEngineFT::addGlyphsToPath(unsigned int *,struct QFixedPoint *,int,class QPainterPath *,class QFlags<enum QTextItem::RenderFlag>)" (?addGlyphsToPath#QFontEngineFT##UAEXPAIPAUQFixedPoint##HPAVQPainterPath##V?$QFlags#W4RenderFlag#QTextItem#####Z)
Error LNK2019: unresolved external symbol _FT_Outline_Get_Bitmap referenced in function "public: struct QFontEngineFT::Glyph * __thiscall QFontEngineFT::loadGlyph(struct QFontEngineFT::QGlyphSet *,unsigned int,struct QFixed,enum QFontEngine::GlyphFormat,bool)const " (?loadGlyph#QFontEngineFT##QBEPAUGlyph#1#PAUQGlyphSet#1#IUQFixed##W4GlyphFormat#QFontEngine##_N#Z)
Error LNK2019: unresolved external symbol _FT_Outline_Transform referenced in function "public: struct QFontEngineFT::Glyph * __thiscall QFontEngineFT::loadGlyph(struct QFontEngineFT::QGlyphSet *,unsigned int,struct QFixed,enum QFontEngine::GlyphFormat,bool)const " (?loadGlyph#QFontEngineFT##QBEPAUGlyph#1#PAUQGlyphSet#1#IUQFixed##W4GlyphFormat#QFontEngine##_N#Z)
Error LNK2019: unresolved external symbol _FT_Outline_Translate referenced in function "public: struct QFontEngineFT::Glyph * __thiscall QFontEngineFT::loadGlyph(struct QFontEngineFT::QGlyphSet *,unsigned int,struct QFixed,enum QFontEngine::GlyphFormat,bool)const " (?loadGlyph#QFontEngineFT##QBEPAUGlyph#1#PAUQGlyphSet#1#IUQFixed##W4GlyphFormat#QFontEngine##_N#Z)
Error LNK2019: unresolved external symbol _FT_Vector_Transform referenced in function "public: struct QFontEngineFT::Glyph * __thiscall QFontEngineFT::loadGlyph(struct QFontEngineFT::QGlyphSet *,unsigned int,struct QFixed,enum QFontEngine::GlyphFormat,bool)const " (?loadGlyph#QFontEngineFT##QBEPAUGlyph#1#PAUQGlyphSet#1#IUQFixed##W4GlyphFormat#QFontEngine##_N#Z)
Error LNK2019: unresolved external symbol _FT_MulFix referenced in function "public: bool __thiscall QFontEngineFT::init(struct QFontEngine::FaceId,bool,enum QFontEngine::GlyphFormat,class QFreetypeFace *)" (?init#QFontEngineFT##QAE_NUFaceId#QFontEngine##_NW4GlyphFormat#3#PAVQFreetypeFace###Z)
Error LNK2019: unresolved external symbol _FT_MulDiv referenced in function "void __cdecl scaleOutline(struct FT_FaceRec_ *,struct FT_GlyphSlotRec_ *,long,long)" (?scaleOutline##YAXPAUFT_FaceRec_##PAUFT_GlyphSlotRec_##JJ#Z)
Error LNK2019: unresolved external symbol _FT_Get_Char_Index referenced in function "public: virtual unsigned int __thiscall QFontEngineFT::glyphIndex(unsigned int)const " (?glyphIndex#QFontEngineFT##UBEII#Z)
Error LNK2019: unresolved external symbol _FT_Set_Charmap referenced in function "public: static class QFreetypeFace * __cdecl QFreetypeFace::getFace(struct QFontEngine::FaceId const &,class QByteArray const &)" (?getFace#QFreetypeFace##SAPAV1#ABUFaceId#QFontEngine##ABVQByteArray###Z)
Error LNK2019: unresolved external symbol _FT_Matrix_Multiply referenced in function "public: struct QFontEngineFT::Glyph * __thiscall QFontEngineFT::loadGlyph(struct QFontEngineFT::QGlyphSet *,unsigned int,struct QFixed,enum QFontEngine::GlyphFormat,bool)const " (?loadGlyph#QFontEngineFT##QBEPAUGlyph#1#PAUQGlyphSet#1#IUQFixed##W4GlyphFormat#QFontEngine##_N#Z)
Error LNK2019: unresolved external symbol _FT_Get_Postscript_Name referenced in function "public: struct QFontEngine::Properties __thiscall QFreetypeFace::properties(void)const " (?properties#QFreetypeFace##QBE?AUProperties#QFontEngine##XZ)
Error LNK2019: unresolved external symbol _FT_Load_Glyph referenced in function "public: virtual void __thiscall QFontEngineFT::addGlyphsToPath(unsigned int *,struct QFixedPoint *,int,class QPainterPath *,class QFlags<enum QTextItem::RenderFlag>)" (?addGlyphsToPath#QFontEngineFT##UAEXPAIPAUQFixedPoint##HPAVQPainterPath##V?$QFlags#W4RenderFlag#QTextItem#####Z)
Error LNK2019: unresolved external symbol _FT_Set_Char_Size referenced in function "public: static class QFreetypeFace * __cdecl QFreetypeFace::getFace(struct QFontEngine::FaceId const &,class QByteArray const &)" (?getFace#QFreetypeFace##SAPAV1#ABUFaceId#QFontEngine##ABVQByteArray###Z)
Error LNK2019: unresolved external symbol _FT_Select_Size referenced in function "public: void __thiscall QFreetypeFace::computeSize(struct QFontDef const &,int *,int *,bool *)" (?computeSize#QFreetypeFace##QAEXABUQFontDef##PAH1PA_N#Z)
Error LNK2019: unresolved external symbol _FT_Done_FreeType referenced in function "public: __thiscall QtFreetypeData::~QtFreetypeData(void)" (??1QtFreetypeData##QAE#XZ)
Error LNK2019: unresolved external symbol _FT_Init_FreeType referenced in function "public: static class QFreetypeFace * __cdecl QFreetypeFace::getFace(struct QFontEngine::FaceId const &,class QByteArray const &)" (?getFace#QFreetypeFace##SAPAV1#ABUFaceId#QFontEngine##ABVQByteArray###Z)
Error LNK2001: unresolved external symbol _FT_Get_Sfnt_Table
Error LNK2019: unresolved external symbol _FT_Get_Sfnt_Table referenced in function "public: static class QStringList __cdecl QBasicFontDatabase::addTTFile(class QByteArray const &,class QByteArray const &)" (?addTTFile#QBasicFontDatabase##SA?AVQStringList##ABVQByteArray##0#Z)
Error LNK2001: unresolved external symbol _FT_Done_Face
Error LNK2019: unresolved external symbol _FT_Done_Face referenced in function "public: static class QStringList __cdecl QBasicFontDatabase::addTTFile(class QByteArray const &,class QByteArray const &)" (?addTTFile#QBasicFontDatabase##SA?AVQStringList##ABVQByteArray##0#Z)
Error LNK2001: unresolved external symbol _FT_New_Memory_Face
Error LNK2019: unresolved external symbol _FT_New_Memory_Face referenced in function "public: static class QStringList __cdecl QBasicFontDatabase::addTTFile(class QByteArray const &,class QByteArray const &)" (?addTTFile#QBasicFontDatabase##SA?AVQStringList##ABVQByteArray##0#Z)
Error LNK2001: unresolved external symbol _FT_New_Face
Error LNK2019: unresolved external symbol _FT_Set_Transform referenced in function "public: virtual void __thiscall QFontEngineFT::getUnscaledGlyph(unsigned int,class QPainterPath *,struct glyph_metrics_t *)" (?getUnscaledGlyph#QFontEngineFT##UAEXIPAVQPainterPath##PAUglyph_metrics_t###Z)
Error LNK1120: 24 unresolved externals
I am using these libraries :
ws2_32.lib
imm32.lib
winmm.lib
qtharfbuzzng.lib
qtpcre.lib
Qt5PlatformSupport.lib
qwindows.lib
opengl32.lib
Can any of you explain me what i am doing wrong ? Thank you.
I've had the exact same issue. You're missing the freetype library qtfreetype.lib.
Add the following line to your .pro file
LIBS += -lqtfreetype
You need QtCore and QtGui at a minimum for this. QString is in QtCore and QGuiApplication is in QtGui. If your Qt usage is restricted to user interface activities, that might be enough. Otherwise, for each class that's failing to link, look in Qt Assistant. The "qmake" note at the top of the page says which library contains that class.
For instance, for Qstring, it has "qmake: QT += core". For Visual Studio on Windows, the actual filenames for the "core" library are Qt5Core.dll (release) Qt5Cored.dll (debug).
Added my case, hope this will helpful.
I'm lost one CPP file in the library project
Be careful when compilation (Lib & Project) has different option MT/MD options

opencv surf_cuda matcher error

OpenCV => 3.1.0
Operating System / Platform => Windows 10 / x64
Compiler => Visual Studio 2013
Detailed description
I wrote my code based on the example given on opencv github page for SURF matcher using CUDA.
When I try to build, i get the following errors:
1>Testing.obj : error LNK2019: unresolved external symbol "public: static struct cv::Ptr<class cv::cuda::DescriptorMatcher> __cdecl cv::cuda::DescriptorMatcher::createBFMatcher(int)" (?createBFMatcher#DescriptorMatcher#cuda#cv##SA?AU?$Ptr#VDescriptorMatcher#cuda#cv###3#H#Z) referenced in function main
1>Testing.obj : error LNK2019: unresolved external symbol "public: __cdecl cv::cuda::SURF_CUDA::SURF_CUDA(void)" (??0SURF_CUDA#cuda#cv##QEAA#XZ) referenced in function main
1>Testing.obj : error LNK2019: unresolved external symbol "public: int __cdecl cv::cuda::SURF_CUDA::defaultNorm(void)const " (?defaultNorm#SURF_CUDA#cuda#cv##QEBAHXZ) referenced in function main
1>Testing.obj : error LNK2019: unresolved external symbol "public: void __cdecl cv::cuda::SURF_CUDA::downloadKeypoints(class cv::cuda::GpuMat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > &)" (?downloadKeypoints#SURF_CUDA#cuda#cv##QEAAXAEBVGpuMat#23#AEAV?$vector#VKeyPoint#cv##V?$allocator#VKeyPoint#cv###std###std###Z) referenced in function main
1>Testing.obj : error LNK2019: unresolved external symbol "public: void __cdecl cv::cuda::SURF_CUDA::downloadDescriptors(class cv::cuda::GpuMat const &,class std::vector<float,class std::allocator<float> > &)" (?downloadDescriptors#SURF_CUDA#cuda#cv##QEAAXAEBVGpuMat#23#AEAV?$vector#MV?$allocator#M#std###std###Z) referenced in function main
1>Testing.obj : error LNK2019: unresolved external symbol "public: void __cdecl cv::cuda::SURF_CUDA::operator()(class cv::cuda::GpuMat const &,class cv::cuda::GpuMat const &,class cv::cuda::GpuMat &,class cv::cuda::GpuMat &,bool)" (??RSURF_CUDA#cuda#cv##QEAAXAEBVGpuMat#12#0AEAV312#1_N#Z) referenced in function main
1><computer_dir>\TestCode\x64\Debug\TestCode.exe : fatal error LNK1120: 6 unresolved externals
All libraries seem to be linked properly and I am not getting any error while writing the code.
It would be great if anyone could say what the error is. Thanks!

Unable to build OSG Earth with Visual Studio 2013 due to ODBC link error in GDAL

I am trying to build OSGEarth using CMAKE and Visual studio 2013
I first downloaded Open Scene Graph 3.2 and the prebuild dependencies (small package) from this page. I generated the visual studio 2013 project and build/installed Open Scene Graph without much problem
After that, I downloaded the source of osgearth 2.5 and generated the Visual Studio 2013 project, using the same dependencies as for Open Scene Graph (I don't want to use the optional dependencies for the first build) and when I try to build the osgEarth project, I got the following error at the linking step :
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLAllocConnect#8 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLAllocEnv#4 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLAllocStmt#8 referenced in function "public: __thiscall CPLODBCStatement::CPLODBCStatement(class CPLODBCSession *)" (??0CPLODBCStatement##QAE#PAVCPLODBCSession###Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLColAttribute#28 referenced in function "public: int __thiscall CPLODBCStatement::CollectResultsInfo(void)" (?CollectResultsInfo#CPLODBCStatement##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLColumns#36 referenced in function "public: int __thiscall CPLODBCStatement::GetColumns(char const *,char const *,char const *)" (?GetColumns#CPLODBCStatement##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLConnect#28 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLDescribeCol#36 referenced in function "public: int __thiscall CPLODBCStatement::CollectResultsInfo(void)" (?CollectResultsInfo#CPLODBCStatement##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLDisconnect#4 referenced in function "public: int __thiscall CPLODBCSession::CloseSession(void)" (?CloseSession#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLEndTran#12 referenced in function "public: int __thiscall CPLODBCSession::CommitTransaction(void)" (?CommitTransaction#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLError#32 referenced in function "public: int __thiscall CPLODBCSession::Failed(int,void *)" (?Failed#CPLODBCSession##QAEHHPAX#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLExecDirect#12 referenced in function "public: int __thiscall CPLODBCStatement::ExecuteSQL(char const *)" (?ExecuteSQL#CPLODBCStatement##QAEHPBD#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFetch#4 referenced in function "public: int __thiscall CPLODBCStatement::Fetch(int,int)" (?Fetch#CPLODBCStatement##QAEHHH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFetchScroll#12 referenced in function "public: int __thiscall CPLODBCStatement::Fetch(int,int)" (?Fetch#CPLODBCStatement##QAEHHH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFreeConnect#4 referenced in function "public: int __thiscall CPLODBCSession::CloseSession(void)" (?CloseSession#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFreeEnv#4 referenced in function "public: int __thiscall CPLODBCSession::CloseSession(void)" (?CloseSession#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFreeStmt#8 referenced in function "public: __thiscall CPLODBCStatement::~CPLODBCStatement(void)" (??1CPLODBCStatement##QAE#XZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLGetConnectAttr#20 referenced in function "public: int __thiscall CPLODBCSession::ClearTransaction(void)" (?ClearTransaction#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLGetData#24 referenced in function "public: int __thiscall CPLODBCStatement::Fetch(int,int)" (?Fetch#CPLODBCStatement##QAEHHH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLNumResultCols#8 referenced in function "public: int __thiscall CPLODBCStatement::CollectResultsInfo(void)" (?CollectResultsInfo#CPLODBCStatement##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLSetConnectAttr#16 referenced in function "public: int __thiscall CPLODBCSession::ClearTransaction(void)" (?ClearTransaction#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLSetConnectOption#12 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLTables#36 referenced in function "public: int __thiscall CPLODBCStatement::GetTables(char const *,char const *)" (?GetTables#CPLODBCStatement##QAEHPBD0#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLDriverConnect#32 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLPrimaryKeys#28 referenced in function "public: int __thiscall CPLODBCStatement::GetPrimaryKeys(char const *,char const *,char const *)" (?GetPrimaryKeys#CPLODBCStatement##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLRemoveDriver#12 referenced in function "public: int __thiscall CPLODBCDriverInstaller::RemoveDriver(char const *,int)" (?RemoveDriver#CPLODBCDriverInstaller##QAEHPBDH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLInstallerError#20 referenced in function "public: int __thiscall CPLODBCDriverInstaller::InstallDriver(char const *,char const *,unsigned short)" (?InstallDriver#CPLODBCDriverInstaller##QAEHPBD0G#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLInstallDriverEx#28 referenced in function "public: int __thiscall CPLODBCDriverInstaller::InstallDriver(char const *,char const *,unsigned short)" (?InstallDriver#CPLODBCDriverInstaller##QAEHPBD0G#Z)
The only think I was able to find is that all the missing method seems to be deprecated ODBC method, like this one
For additional information, the project got a reference to odbc32.lib in its inherited values.
Okay, stupid question... the odbc's dependencies were in the inherited values... but the checkbox indicated to the build process to use these dependencies was not checked. Once it was done, everything is good... I think I need either a coffee or a very big smack on the head...

OCI (Oracle Call Interface) linkage errors - visual studio 2012

I'm trying to compile SOCI (http://soci.sourceforge.net/) which use OCI (Oracle Call Interface) under windows.
Details: Visual studio 2012, Oracle version 11.2.0; 64 bit
I found $(ORCALE_HOME)/OCI/LIB/MSVC libraries. But it won't like (I tried both oraocci11.lib and oci.lib.
The linkage error I get:
2>blob.obj : error LNK2019: unresolved external symbol _OCIDescriptorAlloc referenced in function "public: __thiscall soci::oracle_blob_backend::oracle_blob_backend(struct soci::oracle_session_backend &)" (??0oracle_blob_backend#soci##QAE#AAUoracle_session_backend#1##Z)
2>row-id.obj : error LNK2001: unresolved external symbol _OCIDescriptorAlloc
2>blob.obj : error LNK2019: unresolved external symbol _OCIDescriptorFree referenced in function "public: virtual __thiscall soci::oracle_blob_backend::~oracle_blob_backend(void)" (??1oracle_blob_backend#soci##UAE#XZ)
2>row-id.obj : error LNK2001: unresolved external symbol _OCIDescriptorFree
2>blob.obj : error LNK2019: unresolved external symbol _OCILobGetLength referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::get_len(void)" (?get_len#oracle_blob_backend#soci##UAEIXZ)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobRead referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::read(unsigned int,char *,unsigned int)" (?read#oracle_blob_backend#soci##UAEIIPADI#Z)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobTrim referenced in function "public: virtual void __thiscall soci::oracle_blob_backend::trim(unsigned int)" (?trim#oracle_blob_backend#soci##UAEXI#Z)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobWrite referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::write(unsigned int,char const *,unsigned int)" (?write#oracle_blob_backend#soci##UAEIIPBDI#Z)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobWriteAppend referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::append(char const *,unsigned int)" (?append#oracle_blob_backend#soci##UAEIPBDI#Z)
2>error.obj : error LNK2019: unresolved external symbol _OCIErrorGet referenced in function "void __cdecl soci::details::oracle::get_error_details(int,struct OCIError *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int &)" (?get_error_details#oracle#details#soci##YAXHPAUOCIError##AAV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##AAH#Z)
2>session.obj : error LNK2019: unresolved external symbol _OCIEnvCreate referenced in function "public: __thiscall soci::oracle_session_backend::oracle_session_backend(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,bool)" (??0oracle_session_backend#soci##QAE#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##00H_N#Z)
2>session.obj : error LNK2019: unresolved external symbol _OCIHandleAlloc referenced in function "public: __thiscall soci::oracle_session_backend::oracle_session_backend(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,bool)" (??0oracle_session_backend#soci##QAE#ABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##00H_N#Z)
2>statement.obj : error LNK2001: unresolved external symbol _OCIHandleAlloc
2>vector-into-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
2>vector-use-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
2>session.obj : error LNK2019: unresolved external symbol _OCIHandleFree referenced in function "public: void __thiscall soci::oracle_session_backend::clean_up(void)" (?clean_up#oracle_session_backend#soci##QAEXXZ)
2>standard-into-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
2>standard-use-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
Any Ideas? I'm really stuck on that one.
Thanks, Guy
Well, I found eventually a oci.lib that I can link against ("Instant Client Package")
http://www.oracle.com/technetwork/topics/winsoft-085727.html