What kind of errors are these - c++

1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<int>::~queue<int>(void)" (??1?$queue#H##QAE#XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<double>::~queue<double>(void)" (??1?$queue#N##QAE#XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<char>::~queue<char>(void)" (??1?$queue#D##QAE#XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<double>::pop(void)" (?pop#?$queue#N##QAEHXZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<char>::pop(void)" (?pop#?$queue#D##QAEHXZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<int>::pop(void)" (?pop#?$queue#H##QAEHXZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<double>::top(double &)" (?top#?$queue#N##QAEHAAN#Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<int>::top(int &)" (?top#?$queue#H##QAEHAAH#Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<char>::top(char &)" (?top#?$queue#D##QAEHAAD#Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<char>::push(char)" (?push#?$queue#D##QAEHD#Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<double>::push(double)" (?push#?$queue#N##QAEHN#Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: int __thiscall queue<int>::push(int)" (?push#?$queue#H##QAEHH#Z) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<char>::queue<char>(void)" (??0?$queue#D##QAE#XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<double>::queue<double>(void)" (??0?$queue#N##QAE#XZ) referenced in function _main
1>temp q.obj : error LNK2019: unresolved external symbol "public: __thiscall queue<int>::queue<int>(void)" (??0?$queue#H##QAE#XZ) referenced in function _main
1>C:\Users\a 2\Documents\Visual Studio 2010\Projects\temp stack\Debug\temp stack.exe : fatal error LNK1120: 15 unresolved externals
Can someone please highlight what kind of errors are these?

It is a linker error. There is code somewhere trying to call the functions for the queue class, but there is no queue class linked into the executable.
http://www.cprogramming.com/tutorial/compiler_linker_errors.html

Related

libigl, GLEW, GLFW, and Eigen on CLion, Windows 10. Linker Errors

I'm sure I'm missing something trivial, but I can't put my finger on what.
I'm building a project with four external libraries using CLion. I'm trying to link Eigen, GLEW, GLFW, and libigl. I'm using the VC++ compiler in VS 2015.
This is one iteration of my cmake file:
cmake_minimum_required(VERSION 3.9)
project(Lab1)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
add_executable(Lab1 main.cpp)
include_directories(external/libigl/include)
include_directories(external/glfw/include/)
include_directories(external/eigen-git-mirror/)
include_directories(external/glew_2_1_0/include)
INCLUDE_DIRECTORIES(external/glew_2_1_0/lib/Release/x64)
link_libraries(external/glew_2_1_0/lib/Release/x64)
I have added the glew libraries (both 32 and 64 bit) to their respective folders in VC++. I've also added the glew32.dll files to (64 and 32 bit) to their respective folders in the system folders. I don't think I need to do this if I define where to look for them in my Cmake file, but I'm not entirely sure.
This is my folder structure in CLion:
CLion folder structure.
Here's what main.cpp contains in case it matters:
#include <igl/readOFF.h>
#include <igl/viewer/Viewer.h>
Eigen::MatrixXd V;
Eigen::MatrixXi F;
int main(int argc, char *argv[])
{
// Load a mesh in OFF format
igl::readOFF("bunny.off", V, F);
// Plot the mesh
igl::viewer::Viewer viewer;
viewer.data.set_mesh(V, F);
viewer.launch();
}
These are the linker errors I get.
[100%] Linking CXX executable Lab1.exe
"D:\Actual Program Files\JetBrains\CLion 2017.3.1\bin\cmake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\Lab1.dir --manifests -- D:\ACTUAL~1\VISUAL~2\VC\bin\link.exe /nologo #CMakeFiles\Lab1.dir\objects1.rsp #C:\Users\Mohammed\AppData\Local\Temp\nm6742.tmp
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glBindTexture#8 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::bind_mesh(void)" (?bind_mesh#OpenGL_state#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glBlendFunc#8 referenced in function "public: void __thiscall igl::viewer::ViewerCore::draw(class igl::viewer::ViewerData &,class igl::viewer::OpenGL_state &,bool)" (?draw#ViewerCore#viewer#igl##QAEXAAVViewerData#23#AAVOpenGL_state#23#_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glClear#4 referenced in function "public: void __thiscall igl::viewer::ViewerCore::clear_framebuffers(void)" (?clear_framebuffers#ViewerCore#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glClearColor#16 referenced in function "public: void __thiscall igl::viewer::ViewerCore::clear_framebuffers(void)" (?clear_framebuffers#ViewerCore#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glDeleteTextures#8 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::free_buffers(void)" (?free_buffers#OpenGL_state#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glDisable#4 referenced in function "public: void __thiscall igl::viewer::ViewerCore::draw(class igl::viewer::ViewerData &,class igl::viewer::OpenGL_state &,bool)" (?draw#ViewerCore#viewer#igl##QAEXAAVViewerData#23#AAVOpenGL_state#23#_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glDrawElements#16 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::draw_mesh(bool)" (?draw_mesh#OpenGL_state#viewer#igl##QAEX_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glEnable#4 referenced in function "public: void __thiscall igl::viewer::ViewerCore::draw(class igl::viewer::ViewerData &,class igl::viewer::OpenGL_state &,bool)" (?draw#ViewerCore#viewer#igl##QAEXAAVViewerData#23#AAVOpenGL_state#23#_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glGenTextures#8 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::init_buffers(void)" (?init_buffers#OpenGL_state#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glGetError#0 referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glGetString#4 referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glLineWidth#4 referenced in function "public: void __thiscall igl::viewer::ViewerCore::draw(class igl::viewer::ViewerData &,class igl::viewer::OpenGL_state &,bool)" (?draw#ViewerCore#viewer#igl##QAEXAAVViewerData#23#AAVOpenGL_state#23#_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glPixelStorei#8 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::bind_mesh(void)" (?bind_mesh#OpenGL_state#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glPointSize#4 referenced in function "public: void __thiscall igl::viewer::ViewerCore::draw(class igl::viewer::ViewerData &,class igl::viewer::OpenGL_state &,bool)" (?draw#ViewerCore#viewer#igl##QAEXAAVViewerData#23#AAVOpenGL_state#23#_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glPolygonMode#8 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::draw_mesh(bool)" (?draw_mesh#OpenGL_state#viewer#igl##QAEX_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glPolygonOffset#8 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::draw_mesh(bool)" (?draw_mesh#OpenGL_state#viewer#igl##QAEX_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glTexImage2D#36 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::bind_mesh(void)" (?bind_mesh#OpenGL_state#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glTexParameteri#12 referenced in function "public: void __thiscall igl::viewer::OpenGL_state::bind_mesh(void)" (?bind_mesh#OpenGL_state#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol __imp__glViewport#16 referenced in function "public: void __thiscall igl::viewer::ViewerCore::draw(class igl::viewer::ViewerData &,class igl::viewer::OpenGL_state &,bool)" (?draw#ViewerCore#viewer#igl##QAEXAAVViewerData#23#AAVOpenGL_state#23#_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glewInit#0 referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glewGetErrorString#4 referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glewGetString#4 referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwTerminate referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetErrorCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwGetPrimaryMonitor referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwGetVideoMode referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwWindowHint referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwCreateWindow referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwDestroyWindow referenced in function "public: void __thiscall igl::viewer::Viewer::launch_shut(void)" (?launch_shut#Viewer#viewer#igl##QAEXXZ)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwWindowShouldClose referenced in function "public: bool __thiscall igl::viewer::Viewer::launch_rendering(bool)" (?launch_rendering#Viewer#viewer#igl##QAE_N_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetWindowShouldClose referenced in function "void __cdecl glfw_key_callback(struct GLFWwindow *,int,int,int,int)" (?glfw_key_callback##YAXPAUGLFWwindow##HHHH#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwGetWindowSize referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwGetFramebufferSize referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwGetWindowAttrib referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetWindowSizeCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwPollEvents referenced in function "public: bool __thiscall igl::viewer::Viewer::launch_rendering(bool)" (?launch_rendering#Viewer#viewer#igl##QAE_N_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwWaitEvents referenced in function "public: bool __thiscall igl::viewer::Viewer::launch_rendering(bool)" (?launch_rendering#Viewer#viewer#igl##QAE_N_N#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetInputMode referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetKeyCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetCharModsCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetMouseButtonCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetCursorPosCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetScrollCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSetDropCallback referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwMakeContextCurrent referenced in function "public: int __thiscall igl::viewer::Viewer::launch_init(bool,bool)" (?launch_init#Viewer#viewer#igl##QAEH_N0#Z)
main.cpp.obj : error LNK2019: unresolved external symbol _glfwSwapBuffers referenced in function "public: bool __thiscall igl::viewer::Viewer::launch_rendering(bool)" (?launch_rendering#Viewer#viewer#igl##QAE_N_N#Z)
main.cpp.obj : error LNK2001: unresolved external symbol ___glewActiveTexture
main.cpp.obj : error LNK2001: unresolved external symbol ___glewBindBuffer
main.cpp.obj : error LNK2001: unresolved external symbol ___glewBufferData
main.cpp.obj : error LNK2001: unresolved external symbol ___glewDeleteBuffers
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGenBuffers
main.cpp.obj : error LNK2001: unresolved external symbol ___glewAttachShader
main.cpp.obj : error LNK2001: unresolved external symbol ___glewCompileShader
main.cpp.obj : error LNK2001: unresolved external symbol ___glewCreateProgram
main.cpp.obj : error LNK2001: unresolved external symbol ___glewCreateShader
main.cpp.obj : error LNK2001: unresolved external symbol ___glewDeleteProgram
main.cpp.obj : error LNK2001: unresolved external symbol ___glewDeleteShader
main.cpp.obj : error LNK2001: unresolved external symbol ___glewDisableVertexAttribArray
main.cpp.obj : error LNK2001: unresolved external symbol ___glewEnableVertexAttribArray
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGetAttribLocation
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGetProgramInfoLog
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGetProgramiv
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGetShaderInfoLog
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGetShaderiv
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGetUniformLocation
main.cpp.obj : error LNK2001: unresolved external symbol ___glewLinkProgram
main.cpp.obj : error LNK2001: unresolved external symbol ___glewShaderSource
main.cpp.obj : error LNK2001: unresolved external symbol ___glewUniform1f
main.cpp.obj : error LNK2001: unresolved external symbol ___glewUniform1i
main.cpp.obj : error LNK2001: unresolved external symbol ___glewUniform3fv
main.cpp.obj : error LNK2001: unresolved external symbol ___glewUniform4f
main.cpp.obj : error LNK2001: unresolved external symbol ___glewUniformMatrix4fv
main.cpp.obj : error LNK2001: unresolved external symbol ___glewUseProgram
main.cpp.obj : error LNK2001: unresolved external symbol ___glewVertexAttribPointer
main.cpp.obj : error LNK2001: unresolved external symbol ___glewBindFragDataLocation
main.cpp.obj : error LNK2001: unresolved external symbol ___glewProgramParameteri
main.cpp.obj : error LNK2001: unresolved external symbol ___glewBindVertexArray
main.cpp.obj : error LNK2001: unresolved external symbol ___glewDeleteVertexArrays
main.cpp.obj : error LNK2001: unresolved external symbol ___glewGenVertexArrays
main.cpp.obj : error LNK2001: unresolved external symbol _glewExperimental
Lab1.exe : fatal error LNK1120: 81 unresolved externals
LINK Pass 1 failed. with 1120
NMAKE : fatal error U1077: '"D:\Actual Program Files\JetBrains\CLion 2017.3.1\bin\cmake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"D:\Actual Program Files\Visual Studio 2015\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"D:\Actual Program Files\Visual Studio 2015\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"D:\Actual Program Files\Visual Studio 2015\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Thanks for the help.
EDIT:
Tsyvarev helped me out with the obvious errors. Changed everything to 32-bit too. Down to 47 unresolved externals. Will update once it's working.
Current Cmake:
cmake_minimum_required(VERSION 3.9)
project(Lab1)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
link_libraries(../external/glew_2_1_0/lib/Release/Win32/glew32s)
add_executable(Lab1 main.cpp)
include_directories(external/libigl/include)
include_directories(external/glfw/include/)
include_directories(external/eigen-git-mirror/)
include_directories(external/glew_2_1_0/include)
EDIT: SOLVED It all works! Was missing some libraries. Decided to link them locally. Here's the cmake for the next pour soul that comes across this:
cmake_minimum_required(VERSION 3.9)
project(Lab1)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
link_libraries(../external/glew_2_1_0/lib/Release/Win32/glew32s)
link_libraries(../external/glfw/lib-vc2015/glfw3)
link_libraries(../external/openGL/OPENGL32)
link_libraries(../external/openGL/glut32)
link_libraries(../external/openGL/glu32)
find_package(OpenGL REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIRS})
#target_link_libraries(${PROJECTNAME} ${OPENGL_LIBRARIES})
add_executable(Lab1 main.cpp)
include_directories(external/libigl/include)
include_directories(external/glfw/include/)
include_directories(external/eigen-git-mirror/)
include_directories(external/glew_2_1_0/include)
Thanks for the help!
Command link_libraries affects only on futher targets, so it should be issued before add_executable call.
Also, link_libraries accepts library files, not a directory with them.

I get error LNK2019 when I try to compile zeromq sources

I'm trying to compile the zeromq sources and I have the following error:
I'm using Visual studio 2013 update 4 / windows 7 x64
First of all I compile the libsodium library satisfactorily.
Then I link the libsodium header files directory path to additional dependencies and libsodium.lib to additional library directories. I also specify the name of library in additional dependencies.
I try to compile it under win32 architecture and x64 architecture but I get the same errors.
I know that a __imp prefix is used as a bridge to the function that I want to use so if I linked the libraries appropiately why do I get this error?
Console log:
1>Creating library E:\zmq\libzmq\builds\msvc\vs2013\libzmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libzmq.lib and object E:\zmq\libzmq\builds\msvc\vs2013\libzmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libzmq.exp
1>ctx.obj : error LNK2019: unresolved external symbol __imp__randombytes_close referenced in function "public: __thiscall zmq::ctx_t::~ctx_t(void)" (??1ctx_t#zmq##QAE#XZ)
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__sodium_init referenced in function "public: __thiscall zmq::curve_client_t::curve_client_t(struct zmq::options_t const &)" (??0curve_client_t#zmq##QAE#ABUoptions_t#1##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__sodium_init
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_keypair referenced in function "public: __thiscall zmq::curve_client_t::curve_client_t(struct zmq::options_t const &)" (??0curve_client_t#zmq##QAE#ABUoptions_t#1##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_keypair
1>zmq_utils.obj : error LNK2001: unresolved external symbol __imp__crypto_box_keypair
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_beforenm referenced in function "private: int __thiscall zmq::curve_client_t::process_welcome(unsigned char const *,unsigned int)" (?process_welcome#curve_client_t#zmq##AAEHPBEI#Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_beforenm
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box referenced in function "private: int __thiscall zmq::curve_client_t::produce_hello(class zmq::msg_t *)" (?produce_hello#curve_client_t#zmq##AAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_open referenced in function "private: int __thiscall zmq::curve_client_t::process_welcome(unsigned char const *,unsigned int)" (?process_welcome#curve_client_t#zmq##AAEHPBEI#Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_open
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_afternm referenced in function "public: virtual int __thiscall zmq::curve_client_t::encode(class zmq::msg_t *)" (?encode#curve_client_t#zmq##UAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_afternm
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_open_afternm referenced in function "public: virtual int __thiscall zmq::curve_client_t::decode(class zmq::msg_t *)" (?decode#curve_client_t#zmq##UAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_open_afternm
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__randombytes referenced in function "private: int __thiscall zmq::curve_client_t::produce_initiate(class zmq::msg_t *)" (?produce_initiate#curve_client_t#zmq##AAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__randombytes
1>curve_server.obj : error LNK2019: unresolved external symbol __imp__crypto_secretbox referenced in function "private: int __thiscall zmq::curve_server_t::produce_welcome(class zmq::msg_t *)" (?produce_welcome#curve_server_t#zmq##AAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2019: unresolved external symbol __imp__crypto_secretbox_open referenced in function "private: int __thiscall zmq::curve_server_t::process_initiate(class zmq::msg_t *)" (?process_initiate#curve_server_t#zmq##AAEHPAVmsg_t#2##Z)
Thanks in advance.
You're probably compiling libsodium in a static way.
Try to compile it dinamically and link it again.
Such errors are also able to occur when you have a wrong set calling convention at your project.

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...

fatal error LNK1120: 19 unresolved externals

I have been trying to communicate with my cassandra database with this demo code from Cassandra's cpp-driver. I am using Visual Studio Express 2013 I have been blocked with the following errors:
1>------ Build started: Project: Test_Boost, Configuration: Debug Win32 ------
1> main.cpp`
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cql::cql_initialize(void)" (?cql_initialize#cql##YAXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: static class boost::shared_ptr<class cql::cql_builder_t> __cdecl cql::cql_cluster_t::builder(void)" (?builder#cql_cluster_t#cql##SA?AV?$shared_ptr#Vcql_builder_t#cql###boost##XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _sk_new_null referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _sk_free referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _CRYPTO_cleanup_all_ex_data referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _CRYPTO_num_locks referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _CRYPTO_set_locking_callback referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _CRYPTO_set_id_callback referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _CONF_modules_unload referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _OPENSSL_add_all_algorithms_noconf referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _EVP_cleanup referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _SSL_load_error_strings referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _SSL_library_init referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" (??0do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _ERR_reason_error_string referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall boost::asio::error::detail::ssl_category::message(int)const " (?message#ssl_category#detail#error#asio#boost##UBE?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##H#Z)
1>main.obj : error LNK2019: unresolved external symbol _ERR_free_strings referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _ERR_remove_state referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol _ENGINE_cleanup referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" (??1do_init#openssl_init_base#detail#ssl#asio#boost##QAE#XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: class boost::shared_ptr<class cql::cql_cluster_t> __thiscall cql::cql_builder_t::build(void)" (?build#cql_builder_t#cql##QAE?AV?$shared_ptr#Vcql_cluster_t#cql###boost##XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class cql::cql_builder_t & __thiscall cql::cql_builder_t::add_contact_point(class boost::asio::ip::address const &)" (?add_contact_point#cql_builder_t#cql##QAEAAV12#ABVaddress#ip#asio#boost###Z) referenced in function _main
1>D:\dev\CassandraData\VisualStudio\Test_Boost\Debug\Test_Boost.exe : fatal error LNK1120: 19 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I am a complete newbie in cpp and I would appreciate any help!
Thank you!

Error LNK1120 and LNK 2019 while changing the datatypes from float to double

In the code it is compiling when i use float datatypes then when changing the float to double in typedef there are above linking errors.
Error 12 fatal error LNK1120: 11 unresolved externals C:\work\eb_adasis_rc_toolbox\build\test1\Debug\executable_prj.exe
Error 2 error LNK2019: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetPointListForDisplay(class std::vector<class ElementApproximator::Point,class std::allocator<class ElementApproximator::Point> > &,class std::vector<double,class std::allocator<double> > &)const " (?GetPointListForDisplay#Clothoid#ElementApproximator##UBE_NAAV?$vector#VPoint#ElementApproximator##V?$allocator#VPoint#ElementApproximator###std###std##AAV?$vector#NV?$allocator#N#std###4##Z) referenced in function _main executable_prj.obj
Error 1 error LNK2019: unresolved external symbol "public: bool __thiscall ElementApproximator::Point::GetTmcXY(double &,double &)const " (?GetTmcXY#Point#ElementApproximator##QBE_NAAN0#Z) referenced in function _main executable_prj.obj
Error 3 error LNK2019: unresolved external symbol "public: bool __thiscall ElementApproximator::Clothoid::Init(class ElementApproximator::Point const &,double,double,double,double)" (?Init#Clothoid#ElementApproximator##QAE_NABVPoint#2#NNNN#Z) referenced in function _main executable_prj.obj
Error 4 error LNK2019: unresolved external symbol "public: __thiscall ElementApproximator::Point::Point(double,double)" (??0Point#ElementApproximator##QAE#NN#Z) referenced in function _main executable_prj.obj
Error 11 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Element::Translate(double,double)" (?Translate#Element#ElementApproximator##UAEXNN#Z) executable_prj.obj
Error 10 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Element::Rotate(double)" (?Rotate#Element#ElementApproximator##UAEXN#Z) executable_prj.obj
Error 9 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Clothoid::Translate(double,double)" (?Translate#Clothoid#ElementApproximator##UAEXNN#Z) executable_prj.obj
Error 8 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Clothoid::Rotate(double)" (?Rotate#Clothoid#ElementApproximator##UAEXN#Z) executable_prj.obj
Error 6 error LNK2001: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetTangentGridBearingAtDeltaLength(double,double &)const " (?GetTangentGridBearingAtDeltaLength#Clothoid#ElementApproximator##UBE_NNAAN#Z) executable_prj.obj
Error 7 error LNK2001: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetPointAtDeltaLength(double,class ElementApproximator::Point &)const " (?GetPointAtDeltaLength#Clothoid#ElementApproximator##UBE_NNAAVPoint#2##Z) executable_prj.obj
Error 5 error LNK2001: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetCurvatureAtDeltaLength(double,double &)const " (?GetCurvatureAtDeltaLength#Clothoid#ElementApproximator##UBE_NNAAN#Z) executable_prj.obj
I already saw other posts regarding this error but was unable resolve it using the workarounds mentioned in the answers. Thanking you
Regards,
Mrinal