School Project, set up OpenGL on VS 2019 Community [duplicate] - c++

This question already has answers here:
What is an undefined reference/unresolved external symbol error and how do I fix it?
(39 answers)
Closed 4 years ago.
I've been trying to compile C++ code and dont reliant on IDE recently,
and I decided to use an editor and command line to write and compile code.
And the problem is I want to make a glfw app but I get an error when I linking with glfw3.lib and opengl32.lib:
a.exe : fatal error LNK1120: 92 unresolved externals
os: Windows 7
compiler: clang
src/main.cpp:
#include <stdlib.h>
#include <stdio.h>
#include "window.h"
#define WIDTH 800
#define HEIGHT 600
int main(int argc, char* argv[]){
if (!Window_init(WIDTH, HEIGHT, "HELLOWORLD")){
printf("Problem loading window!\n");
return 1;
}
return 0;
}
src/window.h
#ifndef WINDOW_H
#define WINDOW_H
#include "GLFW/glfw3.h"
#define GLFW_INCLUDE_NONE
static GLFWwindow* window;
int Window_init(int width, int height, char* title);
void Window_update();
int Window_init(int width, int height, char* title){
if (!glfwInit())return 0;
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
window = glfwCreateWindow(width, height, title,NULL, NULL);
if (!window){
return 0;
}
glfwMakeContextCurrent(window);
return 1;
}
void Window_update(){
}
#endif // !WINDOW_H
Compile command:
clang++ ..\src\*.cpp ..\src\*.h -L..\lib -lglfw3 -lopengl32 -I..\include\ -std=c++17
error:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
glfw3.lib(init.c.obj) : warning LNK4217: locally defined symbol ___stdio_common_vsprintf imported in function __glfwInputError
glfw3.lib(wgl_context.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(egl_context.c.obj) : warning LNK4217: locally defined symbol _free imported in function __glfwInitEGL
glfw3.lib(monitor.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(vulkan.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(win32_window.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(win32_joystick.c.obj) : warning LNK4217: locally defined symbol _free imported in function _pollJoystickState
glfw3.lib(window.c.obj) : warning LNK4217: locally defined symbol _free imported in function _glfwDestroyWindow
glfw3.lib(input.c.obj) : warning LNK4217: locally defined symbol _free imported in function _glfwSetInputMode
glfw3.lib(win32_init.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(win32_monitor.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(monitor.c.obj) : warning LNK4217: locally defined symbol _qsort imported in function _refreshVideoModes
glfw3.lib(win32_joystick.c.obj) : warning LNK4049: locally defined symbol _qsort imported
glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(vulkan.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(input.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function __glfwStringInExtensionString
glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp__strstr
glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__strncmp referenced in function __glfwRefreshContextAttribs
glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp__strncmp
glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp____stdio_common_vsscanf referenced in function __vsscanf_l
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__RegisterDeviceNotificationW#12 referenced in function _createHelperWindow
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExW#48 referenced in function _createHelperWindow
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW#48
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow#4 referenced in function __glfwPlatformTerminate
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow#4
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__ShowWindow#8 referenced in function _createHelperWindow
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow#8
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__SystemParametersInfoW#16 referenced in function __glfwPlatformInit
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__CreateDCW#16 referenced in function __glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__DeleteDC#4 referenced in function __glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceCaps#8 referenced in function _createMonitor
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceGammaRamp#8 referenced in function __glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__SetDeviceGammaRamp#8 referenced in function __glfwPlatformSetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsExW#20 referenced in function __glfwPlatformGetVideoModes
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsW#12 referenced in function __glfwPlatformGetVideoMode
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsExW#16 referenced in function __glfwPlatformGetMonitorPos
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplayDevicesW#16 referenced in function __glfwPlatformGetMonitors
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__realloc referenced in function __glfwPlatformGetMonitors
glfw3.lib(monitor.c.obj) : error LNK2019: unresolved external symbol __imp___strdup referenced in function __glfwAllocMonitor
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp___strdup
glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp___strdup
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CreateBitmap#20 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject#4 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CreateDIBSection#24 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__TrackMouseEvent#4 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage#4 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageW#4 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageW#20 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetMessageTime#0 referenced in function _translateKey
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SendMessageW#16 referenced in function __glfwPlatformSetWindowIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__PostMessageW#16 referenced in function __glfwPlatformPostEmptyEvent
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__WaitMessage#0 referenced in function __glfwPlatformWaitEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcW#16 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassW#8 referenced in function __glfwUnregisterWindowClassWin32
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassExW#4 referenced in function __glfwRegisterWindowClassWin32
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__MoveWindow#24 referenced in function __glfwPlatformSetWindowAspectRatio
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos#28 referenced in function __glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__IsWindowVisible#4 referenced in function __glfwPlatformWindowVisible
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__IsIconic#4 referenced in function __glfwPlatformWindowIconified
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__BringWindowToTop#4 referenced in function __glfwPlatformCreateWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__IsZoomed#4 referenced in function __glfwPlatformWindowMaximized
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__OpenClipboard#4 referenced in function __glfwPlatformGetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CloseClipboard#0 referenced in function __glfwPlatformGetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetClipboardData#8 referenced in function __glfwPlatformSetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetClipboardData#4 referenced in function __glfwPlatformGetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__EmptyClipboard#0 referenced in function __glfwPlatformSetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetFocus#4 referenced in function __glfwPlatformCreateWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetActiveWindow#0 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetKeyState#4 referenced in function _getKeyMods
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState#4 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetKeyNameTextW#12 referenced in function __glfwPlatformGetKeyName
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetCapture#4 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ReleaseCapture#0 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__MsgWaitForMultipleObjects#20 referenced in function __glfwPlatformWaitEventsTimeout
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetSystemMetrics#4 referenced in function __glfwPlatformSetWindowIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetForegroundWindow#4 referenced in function __glfwPlatformCreateWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetDC#4 referenced in function _createIcon
glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __imp__GetDC#4
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC#8 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetPropW#12 referenced in function _createNativeWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetPropW#8 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__RemovePropW#8 referenced in function __glfwPlatformDestroyWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW#8 referenced in function __glfwPlatformSetWindowTitle
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect#8 referenced in function __glfwPlatformGetFramebufferSize
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect#8 referenced in function __glfwPlatformSetWindowAspectRatio
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRectEx#16 referenced in function __glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetCursorPos#8 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetCursor#4 referenced in function __glfwPlatformSetCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetCursorPos#4 referenced in function __glfwPlatformGetCursorPos
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ClipCursor#4 referenced in function __glfwPlatformSetCursorMode
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ClientToScreen#8 referenced in function __glfwPlatformGetWindowPos
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ScreenToClient#8 referenced in function __glfwPlatformGetCursorPos
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__WindowFromPoint#8 referenced in function _cursorInClientArea
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetRect#20 referenced in function __glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__PtInRect#12 referenced in function _cursorInClientArea
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongW#8 referenced in function __glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongW#12 referenced in function __glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetClassLongW#8 referenced in function __glfwPlatformSetWindowIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorW#8 referenced in function __glfwPlatformCreateStandardCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DestroyIcon#4 referenced in function __glfwPlatformDestroyCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__LoadImageW#24 referenced in function __glfwRegisterWindowClassWin32
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CreateIconIndirect#4 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CopyIcon#4 referenced in function __glfwPlatformCreateStandardCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragQueryFileW#16 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragQueryPoint#8 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragFinish#4 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragAcceptFiles#8 referenced in function _createNativeWindow
glfw3.lib(win32_joystick.c.obj) : error LNK2019: unresolved external symbol __imp__GetRawInputDeviceInfoA#16 referenced in function _supportsXInput
glfw3.lib(win32_joystick.c.obj) : error LNK2019: unresolved external symbol __imp__GetRawInputDeviceList#12 referenced in function _supportsXInput
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__ChoosePixelFormat#8 referenced in function _loadWGLExtensions
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__DescribePixelFormat#16 referenced in function __glfwCreateContextWGL
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__SetPixelFormat#12 referenced in function __glfwCreateContextWGL
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__SwapBuffers#4 referenced in function _swapBuffersWGL
MSVCRT.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
a.exe : fatal error LNK1120: 92 unresolved externals
clang++.exe: error: linker command failed with exit code 1120 (use -v to see invocation)

Lets demonstrate you the algorithm.
Let we see __imp__GetRawInputDeviceInfoA between unresolved symbols.
Google GetRawInputDeviceInfoA.
First page in results is https://msdn.microsoft.com/en-us/library/windows/desktop/ms645597(v=vs.85).aspx
Open and scroll the page to the bottom. We see there | Library | User32.lib |.
Add the library to the command line: clang++ ..\src\*.cpp -L..\lib -lglfw3 -lopengl32 -I..\include\ -std=c++17 User32.lib
Try to build.
Repeat from 1 till 6 until all unresolved symbols are fixed.
Remove ..\src\*.h from the command line.

Related

I'm having troubles compiling c++ application with GLFW and vulkan libraries using clang. How can i solve this?

I'm trying to compile my c++ test application with GLFW and vulkan using clang on windows, but it fails every time. I get a lot of link errors and any of suggested solutions I could find didn't work. It seems the problem is with the GLFW library files, but I can't find a way to solve it.
Batch script I use for compiling my code:
REM Build script for the test application.
#ECHO OFF
SetLocal EnableDelayedExpansion
REM Get a list of all the .cpp files.
SET cFilenames=
FOR /R %%f in (*.cpp) do (
SET cFilenames=!cFilenames!"%%f"
)
SET assembly=test
SET compilerFlags=-g -std=c++17
REM Define what to include.
SET includeFlags=-Isrc -I../test/include -I%VULKAN_SDK%/Include -IE:/Libraries/GLFW/include -IE:/Libraries/json-3.11.2/include -IE:/Libraries/stb-master
REM Define what to link.
SET linkerFlags=-L%VULKAN_SDK%/Lib -lvulkan-1 -LE:/Libraries/GLFW/lib-vc2022 -lglfw3_mt
REM Define some extra stuff.
SET defines=-D_DEBUG
REM Build the project.
ECHO "Building %assembly%%..."
clang++ %cFilenames% %compilerFlags% -o ../bin/%assembly%.exe %defines% %includeFlags% %linkerFlags%
The errors I receive after I try to build the application:
"Building test..."
libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol _malloc_dbg
main-929849.o : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol _free_dbg
main-929849.o : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _free_dbg
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
main-929849.o : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
main-929849.o : error LNK2001: unresolved external symbol _calloc_dbg
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol _calloc_dbg
libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_TranslateMessage referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_TranslateMessage
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DispatchMessageW referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DispatchMessageW
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_PeekMessageW referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_PeekMessageW
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_UnregisterDeviceNotification referenced in function _glfwPlatformTerminate
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExW referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_CreateWindowExW
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function _glfwPlatformTerminate
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DestroyWindow
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ShowWindow
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ToUnicode referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_MapVirtualKeyW referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_MapVirtualKeyW
glfw3_mt.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function _glfwPlatformInit
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_SystemParametersInfoW
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_CreateDCW referenced in function _glfwPlatformGetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function _glfwPlatformGetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function _glfwGetMonitorContentScaleWin32
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceGammaRamp referenced in function _glfwPlatformGetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_SetDeviceGammaRamp referenced in function _glfwPlatformSetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function _glfwGetMonitorContentScaleWin32
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_GetDC
glfw3_mt.lib(wgl_context.obj) : error LNK2001: unresolved external symbol __imp_GetDC
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function _glfwGetMonitorContentScaleWin32
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ReleaseDC
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ChangeDisplaySettingsExW referenced in function _glfwPlatformGetVideoModes
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsW referenced in function _glfwPlatformGetVideoMode
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsExW referenced in function _glfwPlatformGetMonitorPosglfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayDevicesW referenced in function _glfwPollMonitorsWin32
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetMonitorInfoW referenced in function _glfwPlatformGetMonitorWorkarea
glfw3_mt.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_GetMonitorInfoW
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayMonitors referenced in function _glfwPollMonitorsWin32
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateBitmap referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function updateFramebufferTransparency
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DeleteObject referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBSection referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_TrackMouseEvent referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetMessageTime referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SendMessageW referenced in function _glfwPlatformSetWindowIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PostMessageW referenced in function _glfwPlatformPostEmptyEvent
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WaitMessage referenced in function _glfwPlatformWaitEvents
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_UnregisterClassW referenced in function _glfwUnregisterWindowClassWin32
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassExW referenced in function _glfwRegisterWindowClassWin32
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetLayeredWindowAttributes referenced in function _glfwPlatformGetWindowOpacity
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetLayeredWindowAttributes referenced in function _glfwPlatformSetWindowOpacity
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_FlashWindow referenced in function _glfwPlatformRequestWindowAttention
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MoveWindow referenced in function _glfwPlatformSetWindowAspectRatio
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPos referenced in function _glfwPlatformMaximizeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowPlacement referenced in function createNativeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPlacement referenced in function createNativeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsWindowVisible referenced in function _glfwPlatformMaximizeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsIconic referenced in function _glfwPlatformWindowIconified
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_BringWindowToTop referenced in function _glfwPlatformCreateWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsZoomed referenced in function _glfwPlatformWindowMaximized
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_OpenClipboard referenced in function _glfwPlatformGetClipboardString
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CloseClipboard referenced in function _glfwPlatformGetClipboardString
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetClipboardData referenced in function _glfwPlatformSetClipboardString
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClipboardData referenced in function _glfwPlatformGetClipboardString
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_EmptyClipboard referenced in function _glfwPlatformSetClipboardString
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetFocus referenced in function _glfwPlatformCreateWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetActiveWindow referenced in function _glfwPlatformPollEvents
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetKeyState referenced in function _glfwPlatformPollEvents
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCapture referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ReleaseCapture referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MsgWaitForMultipleObjects referenced in function _glfwPlatformWaitEventsTimeout
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetSystemMetrics referenced in function _glfwPlatformMaximizeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetForegroundWindow referenced in function _glfwPlatformCreateWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetPropW referenced in function createNativeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetPropW referenced in function _glfwPlatformPollEvents
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RemovePropW referenced in function _glfwPlatformDestroyWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function _glfwPlatformSetWindowTitle
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClientRect referenced in function _glfwPlatformGetFramebufferSize
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowRect referenced in function _glfwPlatformSetWindowAspectRatio
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_AdjustWindowRectEx referenced in function _glfwPlatformGetWindowFrameSizeglfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursorPos referenced in function _glfwPlatformPollEvents
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursor referenced in function _glfwPlatformSetCursor
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetCursorPos referenced in function _glfwPlatformGetCursorPos
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClientToScreen referenced in function _glfwPlatformGetWindowPos
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ScreenToClient referenced in function _glfwPlatformGetCursorPos
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WindowFromPoint referenced in function cursorInContentArea
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClipCursor referenced in function updateClipRect
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetRect referenced in function _glfwPlatformGetWindowFrameSize
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_OffsetRect referenced in function _glfwPlatformMaximizeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PtInRect referenced in function cursorInContentArea
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowLongW referenced in function _glfwPlatformGetWindowOpacity
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowLongW referenced in function _glfwPlatformMaximizeWindow
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClassLongPtrW referenced in function _glfwPlatformSetWindowIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadCursorW referenced in function _glfwPlatformSetCursor
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DestroyIcon referenced in function _glfwPlatformDestroyCursor
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function _glfwPlatformCreateStandardCursor
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateIconIndirect referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MonitorFromWindow referenced in function _glfwPlatformGetWindowContentScale
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputData referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterRawInputDevices referenced in function _glfwPlatformSetRawMouseMotion
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragQueryFileW referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragQueryPoint referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragFinish referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragAcceptFiles referenced in function createNativeWindow
glfw3_mt.lib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceInfoA referenced in function deviceCallback
glfw3_mt.lib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceList referenced in function deviceCallback
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_ChoosePixelFormat referenced in function _glfwInitWGL
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_DescribePixelFormat referenced in function _glfwCreateContextWGL
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_SetPixelFormat referenced in function _glfwCreateContextWGL
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_SwapBuffers referenced in function swapBuffersWGL
libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol _wcsdup_dbg referenced in function _Getctype
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol _wcsdup_dbg
libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol _realloc_dbg referenced in function "private: static void __cdecl std::locale::_Locimp::_Locimp_Addfac(class std::locale::_Locimp *,class std::locale::facet *,unsigned __int64)" (?_Locimp_Addfac#_Locimp#locale#std##CAXPEAV123#PEAVfacet#23#_K#Z)
libcpmtd.lib(StlLCMapStringA.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function _freea_crt
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
..\bin\test.exe : fatal error LNK1120: 104 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
Already tried to reinstall clang, MSVCRT and GLFW. I had some clear answers, when I asked the OpenAI chatbot, but it didn't solve my problem either. Any ideas how can I solve this problem?
EDIT
I managed to solve almost all of the errors, but I still get the GLFW unresolved external symbol error.
The updated batch script I use to compile the application:
REM Build script for the test application.
#ECHO OFF
SetLocal EnableDelayedExpansion
REM Get a list of all the .cpp files.
SET cFilenames=
FOR /R %%f in (*.cpp) do (
SET cFilenames=!cFilenames!"%%f"
)
SET assembly=test
SET compilerFlags=-g -std=c++17
REM Define what to include.
SET includeFlags=-Isrc -I../test/include -I%VULKAN_SDK%/Include -IE:/Libraries/GLFW/include -IE:/Libraries/json-3.11.2/include -IE:/Libraries/stb-master
REM Define what to link.
SET linkerFlags=-luser32 -L%VULKAN_SDK%/Lib -lvulkan-1 -LE:/Libraries/GLFW/lib-vc2022 -lglfw3_mt -lmsvcrtd -llibcmtd
REM Define some extra stuff.
SET defines=-D_DEBUG -Xlinker /NODEFAULTLIB:libcmt
REM Build the project.
ECHO "Building %assembly%%..."
clang++ %cFilenames% %compilerFlags% -o ../bin/%assembly%.exe %defines% %includeFlags% %linkerFlags%
The errors that still remain:
"Building test..."
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_CreateDCW referenced in function _glfwPlatformGetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function _glfwPlatformGetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function _glfwGetMonitorContentScaleWin32
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceGammaRamp referenced in function _glfwPlatformGetGammaRamp
glfw3_mt.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_SetDeviceGammaRamp referenced in function _glfwPlatformSetGammaRamp
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateBitmap referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function updateFramebufferTransparency
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DeleteObject referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBSection referenced in function createIcon
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragQueryFileW referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragQueryPoint referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragFinish referenced in function windowProc
glfw3_mt.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragAcceptFiles referenced in function createNativeWindow
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_ChoosePixelFormat referenced in function _glfwInitWGL
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_DescribePixelFormat referenced in function _glfwCreateContextWGL
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_SetPixelFormat referenced in function _glfwCreateContextWGL
glfw3_mt.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_SwapBuffers referenced in function swapBuffersWGL
..\bin\test.exe : fatal error LNK1120: 17 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
Any ideas?
I managed to solve this problem by including 6 libraries and excluding 1.
For anyone who has the same problem as me, here is my batch script for compiling my code:
REM Build script for the test application.
#ECHO OFF
SetLocal EnableDelayedExpansion
REM Get a list of all the .cpp files.
SET cFilenames=
FOR /R %%f in (*.cpp) do (
SET cFilenames=!cFilenames!"%%f"
)
SET assembly=test
SET compilerFlags=-g -std=c++17
REM Define what to include.
SET includeFlags=-Isrc -I../test/include -I%VULKAN_SDK%/Include -IE:/Libraries/GLFW/include -IE:/Libraries/json-3.11.2/include -IE:/Libraries/stb-master
REM Define what to link.
SET linkerFlags=-luser32 -lkernel32 -lgdi32 -lshell32 -L%VULKAN_SDK%/Lib -lvulkan-1 -LE:/Libraries/GLFW/lib-vc2022 -lglfw3_mt -lmsvcrtd -llibcmtd
REM Define some extra stuff.
SET defines=-D_DEBUG -Xlinker /NODEFAULTLIB:libcmt
REM Build the project.
ECHO "Building %assembly%%..."
clang++ %cFilenames% %compilerFlags% -o ../bin/%assembly%.exe %defines% %includeFlags% %linkerFlags%

How to correctly statically link libcurl on Windows using Clang? (64bit)

Recently, for many reasons, I switched on Windows from GCC to Clang and I want to use libcurl in a simple program, but I feel there is no guide how to setup Clang for that.
I use
clang++ -static -DCURL_STATICLIB curl-7.64.1-win64-mingw/lib/libcurl.a http-post.cpp -std=c++17 -g -Xclang -flto-visibility-public-std -o trading.exe
in VSCode and I don't even want to use Make or CMake since it's simple program.
With that command I get:
libcurl.a(formdata.o) : warning LNK4217: locally defined symbol __acrt_iob_func imported in function Curl_getformdata
libcurl.a(setopt.o) : warning LNK4217: locally defined symbol __acrt_iob_func imported in function vsetopt
libcurl.a(url.o) : warning LNK4217: locally defined symbol __acrt_iob_func imported in function Curl_builtin_scheme
libcurl.a(cookie.o) : warning LNK4217: locally defined symbol __acrt_iob_func imported in function Curl_cookie_init
libcurl.a(mprintf.o) : warning LNK4217: locally defined symbol __acrt_iob_func imported in function dprintf_formatf
libcurl.a(inet_ntop.o) : warning LNK4049: locally defined symbol _errno imported
libcurl.a(strtoofft.o) : warning LNK4049: locally defined symbol _errno imported
libcurl.a(parsedate.o) : warning LNK4049: locally defined symbol _errno imported
libcurl.a(strerror.o) : warning LNK4217: locally defined symbol _errno imported in function Curl_strerror
libcurl.a(asyn-thread.o) : warning LNK4217: locally defined symbol _errno imported in function Curl_resolver_cancel
libcurl.a(connect.o) : warning LNK4217: locally defined symbol _errno imported in function Curl_is_connected
libcurl.a(inet_pton.o) : warning LNK4049: locally defined symbol _errno imported
libcurl.a(strerror.o) : warning LNK4217: locally defined symbol _sys_nerr imported in function Curl_strerror
libcurl.a(hostip.o) : warning LNK4217: locally defined symbol tolower imported in function fetch_addr
libcurl.a(url.o) : warning LNK4217: locally defined symbol tolower imported in function Curl_freeset
libcurl.a(urlapi.o) : warning LNK4217: locally defined symbol tolower imported in function parseurl
libcurl.a(x509asn1.o) : warning LNK4217: locally defined symbol isupper imported in function ASN1tostr
libcurl.a(easy.o) : error LNK2019: unresolved external symbol strdup referenced in function global_init
libcurl.a(easy.o) : error LNK2019: unresolved external symbol libssh2_init referenced in function global_init
libcurl.a(easy.o) : error LNK2019: unresolved external symbol libssh2_exit referenced in function curl_global_cleanup
libcurl.a(system_win32.o) : error LNK2019: unresolved external symbol __imp_WSAStartup referenced in function Curl_win32_init
libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSAStartup
libcurl.a(system_win32.o) : error LNK2019: unresolved external symbol __imp_WSACleanup referenced in function Curl_win32_init
libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSACleanup
libcurl.a(tftp.o) : error LNK2019: unresolved external symbol __imp_WSAGetLastError referenced in function tftp_disconnect
libcurl.a(openssl.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(schannel.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(asyn-thread.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(select.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(sendf.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libcurl.a(hostip6.o) : error LNK2019: unresolved external symbol __imp_socket referenced in function Curl_ipv6works
libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_socket
libcurl.a(select.o) : error LNK2019: unresolved external symbol __imp_WSASetLastError referenced in function Curl_wait_ms
libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_WSASetLastError
libcurl.a(curl_addrinfo.o) : error LNK2001: unresolved external symbol __imp_WSASetLastError
libcurl.a(select.o) : error LNK2019: unresolved external symbol __imp_select referenced in function Curl_socket_check
libcurl.a(select.o) : error LNK2019: unresolved external symbol __WSAFDIsSet referenced in function Curl_socket_check
libcurl.a(version.o) : error LNK2019: unresolved external symbol zlibVersion referenced in function curl_version
libcurl.a(content_encoding.o) : error LNK2001: unresolved external symbol zlibVersion
libcurl.a(version.o) : error LNK2019: unresolved external symbol BrotliDecoderVersion referenced in function curl_version
libcurl.a(version.o) : error LNK2019: unresolved external symbol libssh2_version referenced in function curl_version
libcurl.a(tftp.o) : error LNK2019: unresolved external symbol __imp__time64 referenced in function tftp_done
libcurl.a(hostip.o) : error LNK2001: unresolved external symbol __imp__time64
libcurl.a(cookie.o) : error LNK2001: unresolved external symbol __imp__time64
libcurl.a(http.o) : error LNK2001: unresolved external symbol __imp__time64
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp__time64
libcurl.a(rtsp.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(parsedate.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(http.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(telnet.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(imap.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(hostip.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(cookie.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(urlapi.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(http_proxy.o) : error LNK2001: unresolved external symbol sscanf
libcurl.a(sendf.o) : error LNK2019: unresolved external symbol __imp_recv referenced in function Curl_send_plain
libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_recv
libcurl.a(openssl.o) : error LNK2001: unresolved external symbol __imp_recv
libcurl.a(sendf.o) : error LNK2019: unresolved external symbol __imp_send referenced in function Curl_send_plain
libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_send
libcurl.a(mime.o) : error LNK2019: unresolved external symbol __imp__stat64 referenced in function curl_mime_data
libcurl.a(mime.o) : error LNK2019: unresolved external symbol access referenced in function curl_mime_data
libcurl.a(ssh.o) : error LNK2001: unresolved external symbol access
libcurl.a(warnless.o) : error LNK2019: unresolved external symbol read referenced in function curlx_read
libcurl.a(warnless.o) : error LNK2019: unresolved external symbol write referenced in function curlx_write
libcurl.a(cookie.o) : error LNK2019: unresolved external symbol ___chkstk_ms referenced in function Curl_cookie_add
libcurl.a(mprintf.o) : error LNK2001: unresolved external symbol ___chkstk_ms
libcurl.a(netrc.o) : error LNK2001: unresolved external symbol ___chkstk_ms
libcurl.a(formdata.o) : error LNK2001: unresolved external symbol ___chkstk_ms
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_getpeername referenced in function Curl_updateconninfo
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_getsockname referenced in function Curl_updateconninfo
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_getsockname
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_ntohs referenced in function getaddressinfo
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_ntohs
libcurl.a(socks_sspi.o) : error LNK2001: unresolved external symbol __imp_ntohs
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_getsockopt referenced in function Curl_is_connected
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_closesocket referenced in function Curl_closesocket
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_setsockopt referenced in function Curl_sndbufset
libcurl.a(transfer.o) : error LNK2001: unresolved external symbol __imp_setsockopt
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_WSAIoctl referenced in function Curl_connecthost
libcurl.a(transfer.o) : error LNK2001: unresolved external symbol __imp_WSAIoctl
libcurl.a(telnet.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(smb.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(socks_sspi.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(connect.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(curl_addrinfo.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(doh.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_htons
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_bind referenced in function Curl_connecthost
libcurl.a(ftp.o) : error LNK2001: unresolved external symbol __imp_bind
libcurl.a(tftp.o) : error LNK2001: unresolved external symbol __imp_bind
libcurl.a(connect.o) : error LNK2019: unresolved external symbol __imp_connect referenced in function Curl_connecthost
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_version referenced in function Curl_http2_ver
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_rst_stream referenced in function Curl_http2_done
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_send referenced in function Curl_http2_done
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_set_stream_user_data referenced in function Curl_http2_done
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_pack_settings_payload referenced in function Curl_http2_request_upgrade
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_resume_data referenced in function Curl_http2_done_sending
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_mem_recv referenced in function h2_process_pending_input
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_strerror referenced in function h2_process_pending_input
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_priority_spec_init referenced in function h2_process_pending_input
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_priority referenced in function h2_process_pending_input
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_want_read referenced in function h2_process_pending_input
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_want_write referenced in function h2_process_pending_input
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_new referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_send_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_frame_recv_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_data_chunk_recv_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_stream_close_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_begin_headers_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_on_header_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_set_error_callback referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_client_new referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_callbacks_del referenced in function Curl_http2_setup
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_upgrade referenced in function Curl_http2_switched
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_settings referenced in function Curl_http2_switched
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_set_local_window_size referenced in function Curl_http2_switched
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_is_fatal referenced in function Curl_http2_switched
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_request referenced in function http2_send
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_del referenced in function http2_disconnect
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_submit_ping referenced in function http2_conncheck
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_get_stream_user_data referenced in function http2_conncheck
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_session_get_remote_settings referenced in function http2_conncheck
libcurl.a(http2.o) : error LNK2019: unresolved external symbol nghttp2_http2_strerror referenced in function http2_conncheck
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflateInit_ referenced in function deflate_init_writer
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflateEnd referenced in function deflate_unencode_write
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflate referenced in function deflate_close_writer
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol inflateInit2_ referenced in function deflate_close_writer
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderCreateInstance referenced in function brotli_init_writer
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderDecompressStream referenced in function brotli_unencode_write
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderDestroyInstance referenced in function brotli_unencode_write
libcurl.a(content_encoding.o) : error LNK2019: unresolved external symbol BrotliDecoderGetErrorCode referenced in function brotli_unencode_write
libcurl.a(mprintf.o) : error LNK2019: unresolved external symbol sprintf referenced in function dprintf_formatf
libcurl.a(md5.o) : error LNK2019: unresolved external symbol MD5_Init referenced in function Curl_md5it
libcurl.a(md5.o) : error LNK2019: unresolved external symbol MD5_Update referenced in function Curl_md5it
libcurl.a(md5.o) : error LNK2019: unresolved external symbol MD5_Final referenced in function Curl_md5it
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol OPENSSL_load_builtin_modules referenced in function Curl_ossl_init
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_load_builtin_engines referenced in function Curl_ossl_init
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol CONF_modules_load_file referenced in function Curl_ossl_init
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol CRYPTO_get_ex_new_index referenced in function Curl_ossl_init
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol OpenSSL_version_num referenced in function Curl_ossl_version
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_shutdown referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ERR_clear_error referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_read referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_get_error referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ERR_get_error referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ERR_error_string_n referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_free referenced in function Curl_ossl_shutdown
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_pending referenced in function Curl_ossl_data_pending
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol RAND_status referenced in function Curl_ossl_random
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol RAND_bytes referenced in function Curl_ossl_random
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_set_connect_state referenced in function Curl_ossl_close
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_free referenced in function Curl_ossl_close
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_finish referenced in function Curl_ossl_close_all
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_free referenced in function Curl_ossl_close_all
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_SESSION_free referenced in function Curl_ossl_session_free
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_by_id referenced in function Curl_ossl_set_engine
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_init referenced in function Curl_ossl_set_engine
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_set_default referenced in function Curl_ossl_set_engine_default
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_get_id referenced in function Curl_ossl_set_engine_default
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_get_first referenced in function Curl_ossl_engines_list
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ENGINE_get_next referenced in function Curl_ossl_engines_list
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_MD_CTX_new referenced in function Curl_ossl_md5sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_md5 referenced in function Curl_ossl_md5sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_DigestInit_ex referenced in function Curl_ossl_md5sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_DigestUpdate referenced in function Curl_ossl_md5sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_DigestFinal_ex referenced in function Curl_ossl_md5sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_MD_CTX_free referenced in function Curl_ossl_md5sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_sha256 referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol RAND_load_file referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol RAND_add referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol RAND_file_name referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_connect referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_version referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_get_current_cipher referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CIPHER_get_name referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_get0_alpn_selected referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_get_verify_result referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol TLS_client_method referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_new referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_ctrl referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_set_msg_callback referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ERR_peek_error referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BIO_s_mem referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BIO_new referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_get_peer_cert_chain referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol OPENSSL_sk_num referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol OPENSSL_sk_value referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get_subject_name referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_NAME_print_ex referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BIO_ctrl referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get_issuer_name referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get_version referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BIO_printf referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get_serialNumber referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BIO_puts referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ASN1_STRING_new referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get0_signature referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_signature_print referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ASN1_STRING_free referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol i2a_ASN1_OBJECT referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get0_extensions referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_EXTENSION_get_object referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol i2t_ASN1_OBJECT referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509V3_EXT_print referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_EXTENSION_get_data referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ASN1_STRING_print referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BIO_free referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get0_notBefore referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ASN1_TIME_print referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get0_notAfter referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get_pubkey referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_PKEY_id referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_PKEY_get0_RSA referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol RSA_get0_key referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol BN_print referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_PKEY_get0_DSA referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol DSA_get0_pqg referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol DSA_get0_key referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_PKEY_get0_DH referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol DH_get0_pqg referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol DH_get0_key referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol EVP_PKEY_free referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol PEM_write_bio_X509 referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_get_peer_certificate referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol X509_get_ext_d2i referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ASN1_STRING_get0_data referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol ASN1_STRING_length referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_set_options referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_set_next_proto_select_cb referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_set_alpn_protos referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb_userdata referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb referenced in function Curl_ossl_sha256sum
libcurl.a(openssl.o) : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_file referenced in function Curl_ossl_sha256sum
..
trading.exe : fatal error LNK1120: 376 unresolved externals
clang++: error: linker command failed with exit code 1120 (use -v to see invocation)
The terminal process terminated with exit code: 1
How to setup the build command correctly?
And can I use something more neat than
-std=c++17 -Xclang -flto-visibility-public-std
to use the newest C++ and STL functionality?
EDIT: According to https://github.com/Microsoft/vcpkg/issues/2621, I need something like Ws2_32.Lib, Wldap32.Lib and Crypt32.Lib and I somehow thought about that, but as I feel that Clang is somehow cross-platform, I thought it has it's own binaries for that functionality and it doesn't feel very neat to link those Windows libs...
EDIT2: Especially when I link libcurl.a, not .lib.
EDIT3: It is missing strdup anyway, which is POSIX, so I am not sure if should I use a link flag or include a file having definition of that function etc...
The option -static means to produce a static library. You are obviously producing an executable. Just remove that option and it should be ok. Also you might have to put the cpp file before libcurl for link requirements.
Edit: My mistake. The -static option for gcc makes it prefer a static library when both static and shared are found for the -l option. Here you are explicitly linking with the static library. Still, the -static option is not required.
Serves me right for not reading the full output. You are missing a lot of other dependencies, e.g. WinSock, C runtime, zlib, ssl.

compiling static curl with static openssl 1.1.1a

I have a C++ project that compiles and links to a static curl library (7.46.0).
I am upgrading the curl to support openssl 1.1.1a. Building curl 7.64.0 with static openssl using below command.
nmake /f Makefile.vc mode=static MACHINE=x64 WITH_SSL=static ENABLE_SSPI=no ENABLE_WINSSL=no SSL_PATH=C:\openssl\1.1.1a\Win5.2_64\release
The build goes through and the libcurl_a.lib is generated.
Shouldn't the openssl lib implementation also be taken into the libcurl_a.lib here as it is compiled with static openssl ?
Now, i go on to build my C++ application linking to the static curl library.
Here i get multiple link errors.
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OPENSSL_sk_num referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OPENSSL_sk_value referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OPENSSL_sk_pop_free referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OPENSSL_sk_pop referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OpenSSL_version_num referenced in function Curl_ossl_version
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol CRYPTO_get_ex_new_index referenced in function Curl_ossl_init
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol CRYPTO_malloc referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol CRYPTO_free referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_s_file referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_new referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_free referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_puts referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_ctrl referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_s_mem referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_printf referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BN_print referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_new referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_free referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_length referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_type referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_get0_data referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol i2a_ASN1_OBJECT referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol i2t_ASN1_OBJECT referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_to_UTF8 referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_TIME_print referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ASN1_STRING_print referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_MD_CTX_new referenced in function Curl_ossl_md5sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_MD_CTX_free referenced in function Curl_ossl_md5sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_DigestInit_ex referenced in function Curl_ossl_md5sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_DigestUpdate referenced in function Curl_ossl_md5sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_DigestFinal_ex referenced in function Curl_ossl_md5sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_md5 referenced in function Curl_ossl_md5sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_sha256 referenced in function Curl_ossl_sha256sum
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_id referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_get0_RSA referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_get1_RSA referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_get0_DSA referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_get0_DH referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_free referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol EVP_PKEY_copy_parameters referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RSA_get0_key referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RSA_free referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RSA_flags referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol DH_get0_pqg referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol DH_get0_key referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol DSA_get0_pqg referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol DSA_get0_key referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_STORE_set_flags referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_STORE_add_lookup referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_LOOKUP_file referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_load_crl_file referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_verify_cert_error_string referenced in function ossl_connect_step2
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_signature_print referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol i2d_X509_PUBKEY referenced in function pkp_pin_peer_pubkey
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_free referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get0_signature referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_version referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_serialNumber referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_issuer_name referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_subject_name referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get0_notBefore referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get0_notAfter referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_X509_PUBKEY referenced in function pkp_pin_peer_pubkey
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get0_extensions referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_pubkey referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_NAME_print_ex referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_NAME_get_index_by_NID referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_NAME_get_entry referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_NAME_ENTRY_get_data referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_get_ext_d2i referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_EXTENSION_get_object referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_EXTENSION_get_data referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol PEM_read_bio_X509 referenced in function servercert
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol PEM_write_bio_X509 referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_options referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_msg_callback referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_sess_set_new_cb referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_next_proto_select_cb referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_alpn_protos referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get0_alpn_selected referenced in function ossl_connect_step2
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_keylog_callback referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol BIO_f_ssl referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_cipher_list referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_new referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_free referenced in function ossl_close
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_get_cert_store referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_current_cipher referenced in function ossl_connect_step2
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CIPHER_get_name referenced in function ossl_connect_step2
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_pending referenced in function Curl_ossl_data_pending
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_set_fd referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_set_bio referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_ciphersuites referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_use_PrivateKey_file referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_file referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_chain_file referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_SESSION_free referenced in function Curl_ossl_session_free
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_set_session referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_peer_certificate referenced in function servercert
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_peer_cert_chain referenced in function get_cert_chain
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_verify referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_use_PrivateKey referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_use_certificate referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_default_passwd_cb_userdata referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_check_private_key referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_new referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_free referenced in function Curl_ossl_shutdown
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_connect referenced in function ossl_connect_step2
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_read referenced in function Curl_ossl_shutdown
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_write referenced in function ossl_send
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_ctrl referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_ctrl referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_error referenced in function Curl_ossl_shutdown
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol TLS_client_method referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_shutdown referenced in function Curl_ossl_shutdown
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_set_post_handshake_auth referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_alert_desc_string_long referenced in function ssl_tls_trace
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_add_client_CA referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_set_connect_state referenced in function ossl_close
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_certificate referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_privatekey referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_version referenced in function get_ssl_version_txt
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_CTX_load_verify_locations referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_verify_result referenced in function ossl_connect_step2
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_set_ex_data referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol SSL_get_ex_data referenced in function ossl_new_session_cb
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RAND_bytes referenced in function Curl_ossl_random
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RAND_add referenced in function Curl_ossl_seed
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RAND_load_file referenced in function Curl_ossl_seed
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RAND_file_name referenced in function Curl_ossl_seed
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol RAND_status referenced in function Curl_ossl_random
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol CONF_modules_load_file referenced in function Curl_ossl_init
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OPENSSL_load_builtin_modules referenced in function Curl_ossl_init
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol GENERAL_NAMES_free referenced in function verifyhost
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509V3_EXT_print referenced in function X509V3_ext
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol X509_check_issued referenced in function servercert
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ERR_get_error referenced in function Curl_ossl_set_engine
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ERR_peek_error referenced in function ossl_connect_step1
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ERR_clear_error referenced in function Curl_ossl_shutdown
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ERR_error_string_n referenced in function Curl_ossl_set_engine
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol PKCS12_free referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol PKCS12_PBE_add referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol PKCS12_parse referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol d2i_PKCS12_bio referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_response_status referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_response_get1_basic referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_resp_count referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_resp_get0 referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_single_get0_status referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_check_validity referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_BASICRESP_free referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_RESPONSE_free referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol d2i_OCSP_RESPONSE referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_response_status_str referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_cert_status_str referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_crl_reason_str referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol OCSP_basic_verify referenced in function verifystatus
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_get0_user_data referenced in function ssl_ui_reader
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_OpenSSL referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_create_method referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_destroy_method referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_set_opener referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_set_writer referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_set_reader referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_set_closer referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_get_opener referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_get_writer referenced in function ssl_ui_writer
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_get_reader referenced in function ssl_ui_reader
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_method_get_closer referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_get_string_type referenced in function ssl_ui_reader
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_get_input_flags referenced in function ssl_ui_reader
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol UI_set_result referenced in function ssl_ui_reader
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_get_first referenced in function Curl_ossl_engines_list
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_get_next referenced in function Curl_ossl_engines_list
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_by_id referenced in function Curl_ossl_set_engine
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_load_builtin_engines referenced in function Curl_ossl_init
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_ctrl referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_ctrl_cmd referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_free referenced in function Curl_ossl_set_engine
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_get_id referenced in function Curl_ossl_set_engine_default
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_init referenced in function Curl_ossl_set_engine
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_finish referenced in function Curl_ossl_set_engine
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_load_private_key referenced in function cert_stuff
libcurl_a.lib(openssl.obj) : error LNK2019: unresolved external symbol ENGINE_set_default referenced in function Curl_ossl_set_engine_default
libcurl_a.lib(md5.obj) : error LNK2001: unresolved external symbol MD5_Init
libcurl_a.lib(md5.obj) : error LNK2001: unresolved external symbol MD5_Update
libcurl_a.lib(md5.obj) : error LNK2001: unresolved external symbol MD5_Final
libcurl_a.lib(idn_win32.obj) : error LNK2019: unresolved external symbol __imp_IdnToAscii referenced in function curl_win32_idn_to_ascii
libcurl_a.lib(idn_win32.obj) : error LNK2019: unresolved external symbol __imp_IdnToUnicode referenced in function curl_win32_ascii_to_idn
libcurl_a.lib(curl_ntlm_core.obj) : error LNK2019: unresolved external symbol DES_ecb_encrypt referenced in function Curl_ntlm_core_lm_resp
libcurl_a.lib(curl_ntlm_core.obj) : error LNK2019: unresolved external symbol DES_set_odd_parity referenced in function Curl_ntlm_core_mk_lm_hash
libcurl_a.lib(curl_ntlm_core.obj) : error LNK2019: unresolved external symbol DES_set_key referenced in function Curl_ntlm_core_mk_lm_hash
libcurl_a.lib(curl_ntlm_core.obj) : error LNK2019: unresolved external symbol MD4_Init referenced in function Curl_ntlm_core_mk_nt_hash
libcurl_a.lib(curl_ntlm_core.obj) : error LNK2019: unresolved external symbol MD4_Update referenced in function Curl_ntlm_core_mk_nt_hash
libcurl_a.lib(curl_ntlm_core.obj) : error LNK2019: unresolved external symbol MD4_Final referenced in function Curl_ntlm_core_mk_nt_hash
libcurl_a.lib(sha256.obj) : error LNK2019: unresolved external symbol SHA256_Init referenced in function Curl_sha256it
libcurl_a.lib(sha256.obj) : error LNK2019: unresolved external symbol SHA256_Update referenced in function Curl_sha256it
libcurl_a.lib(sha256.obj) : error LNK2019: unresolved external symbol SHA256_Final referenced in function Curl_sha256it
fatal error LNK1120: 198 unresolved externals
I am linking to Ws2_32.Lib Crypt32.Lib Wldap32.Lib
Why is the link errors on openssl library. It was supposed to compile curl with openssl static lib and made into a single lib, right ?
Or my understanding is wrong ? Could someone please help me understand the problem here ?
A static library is really nothing more than an archive of object files. More specifically, it's not linked like an executable or DLL.
That means if you have a static library that you use in your application, you have to link with its dependencies as well.
Please note that building and linking with CURL OpenSSL needs "fine skills" (unfortunately).
I strongly suggest you use the ready to use VC projects in \projects\Windows of the CURL source.
However, there is a catch here. Event though the projects are configured to output LIB, they are not static - they are dynamic. You will need to update this in the VC project to become static (/MT or /MTd).
Afterwards if you want to statically link with LIBCURL you need the following:
Add CURL_STATICLIB; in your visual studio project (no idea why
really)
Link the OpenSSL libraries required by CURL: libcrypto32MT.lib and libssl32MT.lib
Link the libraries required by OpenSSL: Crypt32.Lib and Wldap32.Lib
This will work 100% on the latest CURL as of now (7.76.1 - April 14 2021) and you will be able to link statically into your project.
Enjoy.

Error occurs when linking with glfw3 [duplicate]

This question already has answers here:
What is an undefined reference/unresolved external symbol error and how do I fix it?
(39 answers)
Closed 4 years ago.
I've been trying to compile C++ code and dont reliant on IDE recently,
and I decided to use an editor and command line to write and compile code.
And the problem is I want to make a glfw app but I get an error when I linking with glfw3.lib and opengl32.lib:
a.exe : fatal error LNK1120: 92 unresolved externals
os: Windows 7
compiler: clang
src/main.cpp:
#include <stdlib.h>
#include <stdio.h>
#include "window.h"
#define WIDTH 800
#define HEIGHT 600
int main(int argc, char* argv[]){
if (!Window_init(WIDTH, HEIGHT, "HELLOWORLD")){
printf("Problem loading window!\n");
return 1;
}
return 0;
}
src/window.h
#ifndef WINDOW_H
#define WINDOW_H
#include "GLFW/glfw3.h"
#define GLFW_INCLUDE_NONE
static GLFWwindow* window;
int Window_init(int width, int height, char* title);
void Window_update();
int Window_init(int width, int height, char* title){
if (!glfwInit())return 0;
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
window = glfwCreateWindow(width, height, title,NULL, NULL);
if (!window){
return 0;
}
glfwMakeContextCurrent(window);
return 1;
}
void Window_update(){
}
#endif // !WINDOW_H
Compile command:
clang++ ..\src\*.cpp ..\src\*.h -L..\lib -lglfw3 -lopengl32 -I..\include\ -std=c++17
error:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
glfw3.lib(init.c.obj) : warning LNK4217: locally defined symbol ___stdio_common_vsprintf imported in function __glfwInputError
glfw3.lib(wgl_context.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(egl_context.c.obj) : warning LNK4217: locally defined symbol _free imported in function __glfwInitEGL
glfw3.lib(monitor.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(vulkan.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(win32_window.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(win32_joystick.c.obj) : warning LNK4217: locally defined symbol _free imported in function _pollJoystickState
glfw3.lib(window.c.obj) : warning LNK4217: locally defined symbol _free imported in function _glfwDestroyWindow
glfw3.lib(input.c.obj) : warning LNK4217: locally defined symbol _free imported in function _glfwSetInputMode
glfw3.lib(win32_init.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(win32_monitor.c.obj) : warning LNK4049: locally defined symbol _free imported
glfw3.lib(monitor.c.obj) : warning LNK4217: locally defined symbol _qsort imported in function _refreshVideoModes
glfw3.lib(win32_joystick.c.obj) : warning LNK4049: locally defined symbol _qsort imported
glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(monitor.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(vulkan.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(window.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(input.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_init.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(win32_monitor.c.obj) : error LNK2001: unresolved external symbol __imp__calloc
glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function __glfwStringInExtensionString
glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp__strstr
glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__strncmp referenced in function __glfwRefreshContextAttribs
glfw3.lib(egl_context.c.obj) : error LNK2001: unresolved external symbol __imp__strncmp
glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp____stdio_common_vsscanf referenced in function __vsscanf_l
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__RegisterDeviceNotificationW#12 referenced in function _createHelperWindow
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExW#48 referenced in function _createHelperWindow
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW#48
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow#4 referenced in function __glfwPlatformTerminate
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow#4
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__ShowWindow#8 referenced in function _createHelperWindow
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow#8
glfw3.lib(win32_init.c.obj) : error LNK2019: unresolved external symbol __imp__SystemParametersInfoW#16 referenced in function __glfwPlatformInit
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__CreateDCW#16 referenced in function __glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__DeleteDC#4 referenced in function __glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceCaps#8 referenced in function _createMonitor
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__GetDeviceGammaRamp#8 referenced in function __glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__SetDeviceGammaRamp#8 referenced in function __glfwPlatformSetGammaRamp
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__ChangeDisplaySettingsExW#20 referenced in function __glfwPlatformGetVideoModes
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsW#12 referenced in function __glfwPlatformGetVideoMode
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplaySettingsExW#16 referenced in function __glfwPlatformGetMonitorPos
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__EnumDisplayDevicesW#16 referenced in function __glfwPlatformGetMonitors
glfw3.lib(win32_monitor.c.obj) : error LNK2019: unresolved external symbol __imp__realloc referenced in function __glfwPlatformGetMonitors
glfw3.lib(monitor.c.obj) : error LNK2019: unresolved external symbol __imp___strdup referenced in function __glfwAllocMonitor
glfw3.lib(win32_window.c.obj) : error LNK2001: unresolved external symbol __imp___strdup
glfw3.lib(win32_joystick.c.obj) : error LNK2001: unresolved external symbol __imp___strdup
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CreateBitmap#20 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DeleteObject#4 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CreateDIBSection#24 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__TrackMouseEvent#4 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage#4 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageW#4 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageW#20 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetMessageTime#0 referenced in function _translateKey
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SendMessageW#16 referenced in function __glfwPlatformSetWindowIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__PostMessageW#16 referenced in function __glfwPlatformPostEmptyEvent
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__WaitMessage#0 referenced in function __glfwPlatformWaitEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcW#16 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassW#8 referenced in function __glfwUnregisterWindowClassWin32
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassExW#4 referenced in function __glfwRegisterWindowClassWin32
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__MoveWindow#24 referenced in function __glfwPlatformSetWindowAspectRatio
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetWindowPos#28 referenced in function __glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__IsWindowVisible#4 referenced in function __glfwPlatformWindowVisible
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__IsIconic#4 referenced in function __glfwPlatformWindowIconified
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__BringWindowToTop#4 referenced in function __glfwPlatformCreateWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__IsZoomed#4 referenced in function __glfwPlatformWindowMaximized
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__OpenClipboard#4 referenced in function __glfwPlatformGetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CloseClipboard#0 referenced in function __glfwPlatformGetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetClipboardData#8 referenced in function __glfwPlatformSetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetClipboardData#4 referenced in function __glfwPlatformGetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__EmptyClipboard#0 referenced in function __glfwPlatformSetClipboardString
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetFocus#4 referenced in function __glfwPlatformCreateWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetActiveWindow#0 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetKeyState#4 referenced in function _getKeyMods
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState#4 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetKeyNameTextW#12 referenced in function __glfwPlatformGetKeyName
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetCapture#4 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ReleaseCapture#0 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__MsgWaitForMultipleObjects#20 referenced in function __glfwPlatformWaitEventsTimeout
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetSystemMetrics#4 referenced in function __glfwPlatformSetWindowIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetForegroundWindow#4 referenced in function __glfwPlatformCreateWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetDC#4 referenced in function _createIcon
glfw3.lib(wgl_context.c.obj) : error LNK2001: unresolved external symbol __imp__GetDC#4
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ReleaseDC#8 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetPropW#12 referenced in function _createNativeWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetPropW#8 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__RemovePropW#8 referenced in function __glfwPlatformDestroyWindow
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTextW#8 referenced in function __glfwPlatformSetWindowTitle
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetClientRect#8 referenced in function __glfwPlatformGetFramebufferSize
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetWindowRect#8 referenced in function __glfwPlatformSetWindowAspectRatio
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__AdjustWindowRectEx#16 referenced in function __glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetCursorPos#8 referenced in function __glfwPlatformPollEvents
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetCursor#4 referenced in function __glfwPlatformSetCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetCursorPos#4 referenced in function __glfwPlatformGetCursorPos
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ClipCursor#4 referenced in function __glfwPlatformSetCursorMode
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ClientToScreen#8 referenced in function __glfwPlatformGetWindowPos
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__ScreenToClient#8 referenced in function __glfwPlatformGetCursorPos
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__WindowFromPoint#8 referenced in function _cursorInClientArea
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetRect#20 referenced in function __glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__PtInRect#12 referenced in function _cursorInClientArea
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongW#8 referenced in function __glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongW#12 referenced in function __glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__GetClassLongW#8 referenced in function __glfwPlatformSetWindowIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__LoadCursorW#8 referenced in function __glfwPlatformCreateStandardCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DestroyIcon#4 referenced in function __glfwPlatformDestroyCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__LoadImageW#24 referenced in function __glfwRegisterWindowClassWin32
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CreateIconIndirect#4 referenced in function _createIcon
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__CopyIcon#4 referenced in function __glfwPlatformCreateStandardCursor
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragQueryFileW#16 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragQueryPoint#8 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragFinish#4 referenced in function _windowProc#16
glfw3.lib(win32_window.c.obj) : error LNK2019: unresolved external symbol __imp__DragAcceptFiles#8 referenced in function _createNativeWindow
glfw3.lib(win32_joystick.c.obj) : error LNK2019: unresolved external symbol __imp__GetRawInputDeviceInfoA#16 referenced in function _supportsXInput
glfw3.lib(win32_joystick.c.obj) : error LNK2019: unresolved external symbol __imp__GetRawInputDeviceList#12 referenced in function _supportsXInput
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__ChoosePixelFormat#8 referenced in function _loadWGLExtensions
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__DescribePixelFormat#16 referenced in function __glfwCreateContextWGL
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__SetPixelFormat#12 referenced in function __glfwCreateContextWGL
glfw3.lib(wgl_context.c.obj) : error LNK2019: unresolved external symbol __imp__SwapBuffers#4 referenced in function _swapBuffersWGL
MSVCRT.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
a.exe : fatal error LNK1120: 92 unresolved externals
clang++.exe: error: linker command failed with exit code 1120 (use -v to see invocation)
Lets demonstrate you the algorithm.
Let we see __imp__GetRawInputDeviceInfoA between unresolved symbols.
Google GetRawInputDeviceInfoA.
First page in results is https://msdn.microsoft.com/en-us/library/windows/desktop/ms645597(v=vs.85).aspx
Open and scroll the page to the bottom. We see there | Library | User32.lib |.
Add the library to the command line: clang++ ..\src\*.cpp -L..\lib -lglfw3 -lopengl32 -I..\include\ -std=c++17 User32.lib
Try to build.
Repeat from 1 till 6 until all unresolved symbols are fixed.
Remove ..\src\*.h from the command line.

Libcurl windows build VS2015 OpenSSL HTTP2

I am currently trying to build Libcurl 7.54.0 with OpenSSL and HTTP2 on windows 10 using Visual Studio 2015 and I am getting these errors in the build log at the end of compilation:
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_new referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_del referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_frame_recv_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_invalid_frame_recv_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_data_chunk_recv_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_before_frame_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_frame_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_frame_not_send_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_stream_close_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_begin_headers_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_on_header_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_callbacks_set_error_callback referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_client_new referenced in function _Curl_http2_init
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_del referenced in function _http2_disconnect
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_send referenced in function _h2_session_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_mem_recv referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_resume_data referenced in function _Curl_http2_done_sending
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_want_read referenced in function _should_close_session
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_want_write referenced in function _http2_perform_getsock
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_get_stream_user_data referenced in function _before_frame_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_set_stream_user_data referenced in function _Curl_http2_done
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_get_remote_settings referenced in function _on_frame_recv
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_upgrade referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_pack_settings_payload referenced in function _Curl_http2_request_upgrade
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_strerror referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_http2_strerror referenced in function _Curl_http2_strerror
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_priority_spec_init referenced in function _h2_pri_spec
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_request referenced in function _http2_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_priority referenced in function _h2_session_send
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_rst_stream referenced in function _Curl_http2_done
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_submit_settings referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_session_set_local_window_size referenced in function _Curl_http2_switched
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_version referenced in function _Curl_http2_ver
1>libcurl.lib(http2.obj) : error LNK2019: unresolved external symbol __imp__nghttp2_is_fatal referenced in function _Curl_http2_switched
1>..\..\..\..\build\Win32\VC14\LIB Release - DLL OpenSSL\curl.exe : fatal error LNK1120: 35 unresolved externals
According to OpenSSL & nghttp2 path on my computer, I have added the following to curl & libcurl project:
I have added the following folders to my additionnal library directories (curl project->properties->configuration properties->linker->general->additionnal library directories) :
C:\OpenSSL-Win32\lib
C:\nghttp2-1.22.0\lib
And added for both curl and libcurl project additionnal include directories (both projects->properties->configuration properties->c/c++->general->additionnal include directories) :
C:\OpenSSL-Win32\include
C:\nghttp2-1.22.0\lib\includes
I also added the definition of USE_NGHTTP2 to both project preprocessor definitions (both projects->properties->configuration properties->C/C++->Preprocessor->Preprocessor Definitions) in order to compile with nghttp2.
Finally, I am building using configuration "LIB Release - DLL OpenSSL" with target platform Win32.
Edit: the issue seems to be related to nghttp2 as I successfully build without the NGHTTP2 preprocessor definition.
I am surely missing something but I can't see what at the moment.
Thank you for your assistance
Lucas