error LNK2001: unresolved external symbol when calling IMSL from IVF? - fortran

I got a branch of errors when I compile and link my source code with IVF+IMSL. It looks like
>main.f90
1>Linking...
1>msvcrt.lib(MSVCR120.dll) : error LNK2005: __time32 has already defined in LIBCMT.lib(time.obj)
1>imsls_err.lib(e1ucs.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1inpl.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(flexlm.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1lock.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1init.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e2psh_lmf.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1prt.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(n1rgb.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1mes.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1std.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1sti.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1stl.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(dr1ins.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1psh_lmf.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(n1rty.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1pop.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(dr1t64.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(r1in32.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(dr1t32.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(r1inf.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(rnset.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(drnun.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(r1int.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsl.lib(r1in64.obj) : error LNK2001: unresolved external symbol ___kmpc_global_thread_num
1>imsls_err.lib(e1inpl.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1init.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1prt.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(n1rgb.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1ucs.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1mes.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1std.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1sti.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1stl.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(dr1ins.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1psh_lmf.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(n1rty.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsls_err.lib(e1pop.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(dr1t64.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(r1in32.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(dr1t32.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(r1inf.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(rnset.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(drnun.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(r1int.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
1>imsl.lib(r1in64.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached
I guess one possible source of the error is that my source code is from other author and was written a couple years ago (around 2004). So my IMSL version (7.0) may be different from his. In the original code, it called IMSL using command like INCLUDE 'link_f90_static.h',but it failed with Error #5102: cannot open link_f90_static.h. Alternatively, I substituted this command with
include link_fnl_static.h
and the Error #5102 was resolved. But a branch of LNK2019 errors emerge. I don't know if it's really caused by the IMSL version problem.
A similar thread in the intel fortran user forum is https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/298641
but since I have never installed CVF,it may not be source of my problem
Any suggestion? Thank you.

As the Intel-supplied IMSL instructions say, if you are going to link to the static library form of IMSL you also need to link to the OpenMP libraries. One way to do that is to add the line:
!DEC$ OBJCOMMENT LIB:"libiomp5md.lib"
following that INCLUDE line.
But my preferred choice would be for you to include 'link_fnl_shared.h' instead. This would probably also take care of that __time32 reference.

Related

Linking errors Cython

I am trying to compile a simple "Hello World" program with cython and get a bunch of confusing linking errors.
The code is
# setupp.py
from setuptools import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize("hello_world.pyx"))
and
# hello_world.pyx
print("Hello World!")
I am compiling with
python setup.py built_ext --inplace
The errors I am getting are below. If anyone has suggestions on what could be the cause of these errors, it would be much appreciated!
LIBCMT.lib(dll_dllmain.obj) : error LNK2001: unresolved external
symbol _initterm
LIBCMT.lib(dll_dllmain.obj) : error LNK2001: unresolved external
symbol _initterm_e
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_RtlCaptureContext
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_RtlCaptureContext
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_RtlLookupFunctionEntry
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_RtlLookupFunctionEntry
libvcruntime.lib(risctrnsctrl.obj) : error LNK2001: unresolved
external symbol __imp_RtlLookupFunctionEntry
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_RtlVirtualUnwind
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_RtlVirtualUnwind
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_UnhandledExceptionFilter
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_UnhandledExceptionFilter
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_SetUnhandledExceptionFilter
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_SetUnhandledExceptionFilter
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_GetCurrentProcess
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
__imp_TerminateProcess
LIBCMT.lib(gs_report.obj) : error LNK2001: unresolved external symbol
IsProcessorFeaturePresent
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol IsProcessorFeaturePresent
LIBCMT.lib(gs_support.obj) : error LNK2001: unresolved external symbol
__imp_QueryPerformanceCounter
LIBCMT.lib(gs_support.obj) : error LNK2001: unresolved external symbol
__imp_GetCurrentProcessId
LIBCMT.lib(gs_support.obj) : error LNK2001: unresolved external symbol
__imp_GetCurrentThreadId
LIBCMT.lib(gs_support.obj) : error LNK2001: unresolved external symbol
__imp_GetSystemTimeAsFileTime
LIBCMT.lib(tncleanup.obj) : error LNK2001: unresolved external symbol
__imp_InitializeSListHead
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_seh_filter_dll
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_configure_narrow_argv
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_initialize_narrow_environment
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_initialize_onexit_table
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_register_onexit_function
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_execute_onexit_table
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_crt_atexit
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_crt_at_quick_exit
LIBCMT.lib(utility.obj) : error LNK2001: unresolved external symbol
_cexit
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_IsDebuggerPresent
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_GetStartupInfoW
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol __imp_GetModuleHandleW
LIBCMT.lib(utility_desktop.obj) : error LNK2001: unresolved external
symbol terminate
libvcruntime.lib(ehhelpers.obj) : error LNK2001: unresolved external
symbol terminate
libvcruntime.lib(frame.obj) : error LNK2001: unresolved external
symbol terminate
libvcruntime.lib(riscchandler.obj) : error LNK2001: unresolved
external symbol __imp_RtlUnwindEx
libvcruntime.lib(risctrnsctrl.obj) : error LNK2001: unresolved
external symbol __imp_RtlUnwindEx

How to fix LNK2001 unresolved external symbol __std_exception_destroy

I'm trying to compile a project that use OpenCV as static library with Microsoft Visual Studio Community 2019 Version 16.4.4.
I'm trying to fix this for several days without succes. 2486 Errors
Here is an exctract of the output log
1>libconcrt.lib(UMSSchedulerProxy.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSFreeVirtualProcessorRoot.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSThreadProxy.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSFreeThreadProxy.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSSchedulingContext.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSBackgroundPoller.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(FreeThreadProxy.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(TransmogrifiedPrimary.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(Transmogrificator.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(ThreadProxy.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(location.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSThreadInternalContext.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(VirtualProcessorRoot.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(FreeVirtualProcessorRoot.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(SchedulerProxy.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSWrapper.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(WinRTWrapper.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(ThreadProxyFactoryManager.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(ScheduleGroupBase.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(ExternalContextBase.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(UMSThreadScheduler.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(ExecutionResource.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(Platform.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(Exceptions.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(ResourceManager.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(InternalContextBase.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(SchedulerBase.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(Chores.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(TaskCollection.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(event.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(CurrentScheduler.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(rtlocks.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(utils.obj) : error LNK2001: unresolved external symbol __std_exception_destroy
1>libconcrt.lib(SchedulerPolicyBase.obj) : error LNK2001: unresolved external symbol __std_exception_destroy

Can't link libcurl on my ongoing project

I've got an project that started as a client program. Later on I decided to implement some client to server communication to make kind of a login system. I developed it in plain HTTP post requests and it worked.
Recently I've updated my server to HTTPS and now the plain HTTP post request doesn't work any more, and since I'm going to transfer sensitive data over the web I decided to implement SSL also on my client. The alternatives I've seen includes Libcurl with OpenSSL/WolfSSL or Boost with OpenSSL. I decided to go on the Libcurl way.
So now, I've tried downloading some precompiled libcurl builds and such and with no success on linking to it, giving me some kind of this error:
1>Attacker.obj : error LNK2001: unresolved external symbol __imp__PostMessageW#16
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__EnableWindow#8
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__GetWindowTextLengthA#4
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__GetOpenFileNameA#4
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__GetClientRect#8
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__SendMessageA#16
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__SetWindowTextA#8
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__GetWindowTextA#12
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__RedrawWindow#16
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__ShowWindow#8
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__SetWindowPos#28
1>GEFunc.obj : error LNK2001: unresolved external symbol __imp__DestroyWindow#4
1>FormVarClass.obj : error LNK2001: unresolved external symbol __imp__CreateSolidBrush#4
1>FormVarClass.obj : error LNK2001: unresolved external symbol __imp__CreatePen#12
1>FormVarClass.obj : error LNK2001: unresolved external symbol __imp__CreateFontW#56
1>GameClient.obj : error LNK2001: unresolved external symbol __imp__SetParent#8
1>GameClient.obj : error LNK2001: unresolved external symbol __imp__MoveWindow#24
1>GameClient.obj : error LNK2001: unresolved external symbol __imp__AttachThreadInput#12
1>GameClient.obj : error LNK2001: unresolved external symbol __imp__GetWindowLongA#8
1>GameClient.obj : error LNK2001: unresolved external symbol __imp__SetWindowLongA#12
1>GameClient.obj : error LNK2001: unresolved external symbol __imp__GetWindowRect#8
1>GUI.obj : error LNK2001: unresolved external symbol __imp__EndPaint#8
1>GUI.obj : error LNK2001: unresolved external symbol __imp__BeginPaint#8
1>GUI.obj : error LNK2001: unresolved external symbol __imp__PostQuitMessage#4
1>GUI.obj : error LNK2001: unresolved external symbol __imp__LoadCursorW#8
1>GUI.obj : error LNK2001: unresolved external symbol __imp__LoadIconW#8
1>GUI.obj : error LNK2001: unresolved external symbol __imp__TranslateMessage#4
1>GUI.obj : error LNK2001: unresolved external symbol __imp__CreateWindowExA#48
1>GUI.obj : error LNK2001: unresolved external symbol __imp__IsDialogMessageW#8
1>GUI.obj : error LNK2001: unresolved external symbol __imp__DispatchMessageW#4
1>GUI.obj : error LNK2001: unresolved external symbol __imp__RegisterClassExW#4
1>GUI.obj : error LNK2001: unresolved external symbol __imp__CloseWindow#4
1>GUI.obj : error LNK2001: unresolved external symbol __imp__DefWindowProcW#16
1>GUI.obj : error LNK2001: unresolved external symbol __imp__GetMessageW#16
1>Main.obj : error LNK2001: unresolved external symbol __imp__SHGetFolderPathA#20
1>Mem.obj : error LNK2001: unresolved external symbol __imp__EnumWindows#8
1>Mem.obj : error LNK2001: unresolved external symbol __imp__IsWindowVisible#4
1>Mem.obj : error LNK2001: unresolved external symbol __imp__GetWindow#8
1>Mem.obj : error LNK2001: unresolved external symbol __imp__GetWindowThreadProcessId#8
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__InvalidateRect#12
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__ExtTextOutW#32
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__FillRgn#12
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__RoundRect#28
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__CombineRgn#16
1>Overrides.obj : error LNK2001: unresolved external symbol enter code here__imp__ScrollWindow#20
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SetScrollPos#16
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__DeleteObject#4
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SetBkColor#8
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__EnableScrollBar#12
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SetCursor#4
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SetBkMode#8
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SetTextColor#8
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__GetSysColor#4
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__CreateRectRgn#16
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__CreateRoundRectRgn#24
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__DrawTextA#20
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SendMessageW#16
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__UnionRect#12
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__FillRect#12
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__InflateRect#12
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SelectObject#8
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__SetScrollInfo#16
1>Overrides.obj : error LNK2001: unresolved external symbol __imp__GetWindowTextLengthW#4
1>Window.obj : error LNK2001: unresolved external symbol __imp__TrackMouseEvent#4
1>libcurl.lib(strerror.obj) : error LNK2001: unresolved external symbol __imp__strerror
1>libcurl.lib(strerror.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurl.lib(url.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurl.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurl.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurl.lib(strerror.obj) : error LNK2001: unresolved external symbol __imp____sys_nerr
1>libcurl.lib(cookie.obj) : error LNK2001: unresolved external symbol __imp__fgets
1>libcurl.lib(netrc.obj) : error LNK2001: unresolved external symbol __imp__fgets
1>libcurl.lib(cookie.obj) : error LNK2001: unresolved external symbol __imp__fputs
1>libcurl.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(rtsp.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(http_proxy.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(parsedate.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(imap.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(cookie.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(hostip.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(url.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(http.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurl.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(tftp.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(digest.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(ftplistparser.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(vtls.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(url.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(http.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurl.lib(vtls.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurl.lib(url.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurl.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurl.lib(formdata.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurl.lib(warnless.obj) : error LNK2001: unresolved external symbol __imp__read
1>OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp__read
1>libcurl.lib(warnless.obj) : error LNK2001: unresolved external symbol __imp__write
1>OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp__write
1>libcurl.lib(curl_threads.obj) : error LNK2001: unresolved external symbol __imp___beginthreadex
1>libcurl.lib(file.obj) : error LNK2001: unresolved external symbol __imp__close
1>OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol __imp__close
1>libcurl.lib(file.obj) : error LNK2001: unresolved external symbol __imp__open
1>OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol __imp__open
1>libcurl.lib(file.obj) : error LNK2001: unresolved external symbol __imp___fstat64
1>libcurl.lib(smb.obj) : error LNK2001: unresolved external symbol __imp___getpid
1>libcurl.lib(system_win32.obj) : error LNK2001: unresolved external symbol __imp___mbspbrk
1>libcurl.lib(formdata.obj) : error LNK2001: unresolved external symbol __imp__feof
1>libcurl.lib(formdata.obj) : error LNK2001: unresolved external symbol __imp__ferror
1>libcurl.lib(formdata.obj) : error LNK2001: unresolved external symbol __imp___stat64
Then I tried building the Libcurl from myself and downloaded the latest version from their site and built it from scratch, using the "LIB Debug - LIB OpenSSL" build option. Linked to OpenSSL libs and pointed to their include directories, it compiled and built me the libcurl.lib file.
So, in my main project, now I included both the libcurl include dir and the openssl include dir, then I linked both of these corresponding Lib folder so it should be alright.
http://prntscr.com/eg389b.
Then in the linker additional dependencies I've set to "crypt32.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;libcurld.lib". This is all the steps I've found that should be done to work, but even then I've been getting the exactly same unresolved external symbol error.
PS: Starting from scratch wouldn't be an option.
PS2: For the sake of portability, I would prefer building my program as himself without the need of external DLLs other than the VC++ redist.
EDIT 1
By now, using the method described here LibCurl - Release Static Lib linking problems I've reduced the number of unresolved external symbols drastically and traced them back to the libcurld.lib, OLDNAMES.lib and MSVCRTD.lib. So only the three of those are appearing and bugging me out.
1>libcurld.lib(strerror.obj) : error LNK2019: unresolved external symbol __imp__strerror referenced in function _Curl_strerror
1>libcurld.lib(curl_gethostname.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurld.lib(strerror.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurld.lib(url.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurld.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurld.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__strncpy
1>libcurld.lib(rand.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(http_ntlm.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(http_proxy.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(ntlm.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(pingpong.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(openssl.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(imap.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(rtsp.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(conncache.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(warnless.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(curl_addrinfo.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(inet_ntop.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(connect.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(http.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(wildcard.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(hostip.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(vtls.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(url.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(sendf.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(strerror.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(slist.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(multi.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(asyn-thread.obj) : error LNK2001: unresolved external symbol __imp___wassert
1>libcurld.lib(strerror.obj) : error LNK2019: unresolved external symbol __imp____sys_nerr referenced in function _Curl_strerror
1>libcurld.lib(cookie.obj) : error LNK2019: unresolved external symbol __imp__fgets referenced in function _get_line
1>libcurld.lib(netrc.obj) : error LNK2001: unresolved external symbol __imp__fgets
1>libcurld.lib(cookie.obj) : error LNK2019: unresolved external symbol __imp__fputs referenced in function _cookie_output
1>libcurld.lib(telnet.obj) : error LNK2019: unresolved external symbol __imp____stdio_common_vsscanf referenced in function _sendsuboption
1>libcurld.lib(rtsp.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(http_proxy.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(http.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(parsedate.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(imap.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(cookie.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(hostip.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(url.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp____stdio_common_vsscanf
1>libcurld.lib(ftp.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function _ftp_statemach_act
1>libcurld.lib(tftp.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(digest.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(ftplistparser.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(vtls.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(url.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(http.obj) : error LNK2001: unresolved external symbol __imp__strstr
1>libcurld.lib(vtls.obj) : error LNK2019: unresolved external symbol __imp__fread referenced in function _Curl_pin_peer_pubkey
1>libcurld.lib(url.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurld.lib(transfer.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurld.lib(formdata.obj) : error LNK2001: unresolved external symbol __imp__fread
1>libcurld.lib(warnless.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function _curlx_read
1>OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp__read
1>libcurld.lib(warnless.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function _curlx_write
1>OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp__write
1>libcurld.lib(curl_threads.obj) : error LNK2019: unresolved external symbol __imp___beginthreadex referenced in function _Curl_thread_create
1>libcurld.lib(file.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function _file_done
1>OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol __imp__close
1>libcurld.lib(file.obj) : error LNK2019: unresolved external symbol __imp__open referenced in function _file_connect
1>OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol __imp__open
1>libcurld.lib(file.obj) : error LNK2019: unresolved external symbol __imp___fstat64 referenced in function _file_do
1>libcurld.lib(smb.obj) : error LNK2019: unresolved external symbol __imp___getpid referenced in function _smb_format_message
1>libcurld.lib(system_win32.obj) : error LNK2019: unresolved external symbol __imp___mbspbrk referenced in function __tcspbrk
1>libcurld.lib(formdata.obj) : error LNK2019: unresolved external symbol __imp__feof referenced in function _Curl_getformdata
1>libcurld.lib(formdata.obj) : error LNK2019: unresolved external symbol __imp__ferror referenced in function _Curl_getformdata
1>libcurld.lib(formdata.obj) : error LNK2019: unresolved external symbol __imp___stat64 referenced in function _AddFormData
1>MSVCRTD.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
You must change the libcurl compile option to Mtd/Mt.
Can you describe how you built libcurl?
It looks like you are not using the same version of the c library in your project and in libcurl. Are you using the same compiler? Visual Studio calls this the "Platform Toolset". I remember compiling libcurl in the past, but I didn't go the static lib route. It seems to be a problem with a mismatch of the C library. When you try to link this library to another program with a different version of the C library, it becomes ambiguous which functions you are referring to.
I just checked the libcurl bundle from their website. There is a sln project curl-7.53.1\projects\Windows\VC14 that you should open. From there, make sure that you select "LIB Debug - [ssl library choice]" and that you're using the same arch, like 32 bits or 64 bits, in both projects.
I don't think that simply adding a single switch to the compiler is enough.
Something I've just seen on curl website :
As a general rule, building a DLL with static CRT linkage is highly
discouraged, and intermixing CRTs in the same app is something to
avoid at any cost.

unresolved external symbol with including glfw3 from inside a library

I have a project that includes the GLFW3 library, and a second project that includes the first project as a lib file, but when I compile the second one I get this error:
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSwapBuffers
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwTerminate
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSetMouseButtonCallback
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwPollEvents
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwInit
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSetKeyCallback
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSetWindowShouldClose
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwCreateWindow
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSetInputMode
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwMakeContextCurrent
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwDestroyWindow
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSetCursorPosCallback
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwSetWindowSizeCallback
1>Duno-Core.lib(Display.obj) : error LNK2001: unresolved external symbol __imp_glfwWindowShouldClose
I've been trying to figure out why this is happening and cannot find anything like this, anywhere. If you can figure out all the horrible mistakes I’ve made, then that will help me massively!
Thanks.

Linking Allegro 4.4 library in msvc to a project

I succeeded to compile allegro 4.4 in visual studio 2013 (msvc 12).
I try to compile atanks 6.4 opensource project.
Inside the project I link to alleg.lib that already compile in allegro project.
When I compile atanks, it throw errors messages:
This error for not linking allegro. but I do link, and it find the lib file.
1>atanks.obj : error LNK2001: unresolved external symbol __imp__mouse_x
1>atanks.obj : error LNK2001: unresolved external symbol __imp__reserve_voices
1>atanks.obj : error LNK2001: unresolved external symbol __imp___WinMain
1>atanks.obj : error LNK2001: unresolved external symbol __imp__install_keyboard
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_color_depth
1>atanks.obj : error LNK2001: unresolved external symbol __imp__get_mixer_voices
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_mouse_sprite
1>atanks.obj : error LNK2001: unresolved external symbol __imp__mouse_y
1>atanks.obj : error LNK2001: unresolved external symbol __imp__detect_digi_driver
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_mouse_sprite_focus
1>atanks.obj : error LNK2001: unresolved external symbol __imp__readkey
1>atanks.obj : error LNK2001: unresolved external symbol __imp__makecol
1>atanks.obj : error LNK2001: unresolved external symbol __imp__text_length
1>atanks.obj : error LNK2001: unresolved external symbol __imp__show_os_cursor
1>atanks.obj : error LNK2001: unresolved external symbol __imp__get_config_string
1>atanks.obj : error LNK2001: unresolved external symbol __imp__clear_keybuf
1>atanks.obj : error LNK2001: unresolved external symbol __imp__textout_ex
1>atanks.obj : error LNK2001: unresolved external symbol __imp__blit
1>atanks.obj : error LNK2001: unresolved external symbol __imp__textprintf_right_ex
1>atanks.obj : error LNK2001: unresolved external symbol __imp__textout_centre_ex
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_close_button_callback
1>atanks.obj : error LNK2001: unresolved external symbol __imp__font
1>atanks.obj : error LNK2001: unresolved external symbol __imp__install_mouse
1>atanks.obj : error LNK2001: unresolved external symbol __imp__keypressed
1>atanks.obj : error LNK2001: unresolved external symbol __imp__textprintf_centre_ex
1>atanks.obj : error LNK2001: unresolved external symbol __imp__enable_triple_buffer
1>atanks.obj : error LNK2001: unresolved external symbol __imp__screen
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_display_switch_mode
1>atanks.obj : error LNK2001: unresolved external symbol __imp__get_mixer_quality
1>atanks.obj : error LNK2001: unresolved external symbol __imp__remove_sound
1>atanks.obj : error LNK2001: unresolved external symbol __imp__mouse_b
1>atanks.obj : error LNK2001: unresolved external symbol __imp__stop_sample
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_mixer_quality
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_config_string
1>atanks.obj : error LNK2001: unresolved external symbol __imp___install_allegro_version_check
1>atanks.obj : error LNK2001: unresolved external symbol __imp__install_sound
1>atanks.obj : error LNK2001: unresolved external symbol __imp__unscare_mouse
1>atanks.obj : error LNK2001: unresolved external symbol __imp__allegro_exit
1>atanks.obj : error LNK2001: unresolved external symbol __imp__show_mouse
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_gfx_mode
1>atanks.obj : error LNK2001: unresolved external symbol __imp__scare_mouse
1>atanks.obj : error LNK2001: unresolved external symbol __imp__draw_sprite
1>atanks.obj : error LNK2001: unresolved external symbol __imp__rect
1>atanks.obj : error LNK2001: unresolved external symbol __imp__rectfill
1>atanks.obj : error LNK2001: unresolved external symbol __imp__clear_to_color
1>atanks.obj : error LNK2001: unresolved external symbol __imp__get_desktop_resolution
1>atanks.obj : error LNK2001: unresolved external symbol __imp__desktop_color_depth
1>atanks.obj : error LNK2001: unresolved external symbol __imp__set_window_title
1>beam.obj : error LNK2001: unresolved external symbol __imp__set_trans_blender
1>beam.obj : error LNK2001: unresolved external symbol __imp__drawing_mode
1>beam.obj : error LNK2001: unresolved external symbol __imp__do_line
1>beam.obj : error LNK2001: unresolved external symbol __imp__circlefill
1>beam.obj : error LNK2001: unresolved external symbol __imp__getpixel
1>button.obj : error LNK2001: unresolved external symbol __imp__text_height
1>button.obj : error LNK2001: unresolved external symbol __imp__line
1>clock.obj : error LNK2001: unresolved external symbol __imp__install_int_ex
1>clock.obj : error LNK2001: unresolved external symbol __imp__remove_int
1>debris_pool.obj : error LNK2001: unresolved external symbol __imp__create_bitmap
1>debris_pool.obj : error LNK2001: unresolved external symbol __imp__destroy_bitmap
1>decor.obj : error LNK2001: unresolved external symbol __imp__getb
1>decor.obj : error LNK2001: unresolved external symbol __imp__getr
1>decor.obj : error LNK2001: unresolved external symbol __imp__getg
1>decor.obj : error LNK2001: unresolved external symbol __imp__itofix
1>decor.obj : error LNK2001: unresolved external symbol __imp__rotate_sprite
1>decor.obj : error LNK2001: unresolved external symbol __imp__putpixel
1>environment.obj : error LNK2001: unresolved external symbol __imp__load_font
1>environment.obj : error LNK2001: unresolved external symbol __imp__allegro_error
1>environment.obj : error LNK2001: unresolved external symbol __imp__destroy_font
1>environment.obj : error LNK2001: unresolved external symbol __imp__destroy_sample
1>environment.obj : error LNK2001: unresolved external symbol __imp__load_sample
1>environment.obj : error LNK2001: unresolved external symbol __imp__load_bitmap
1>explosion.obj : error LNK2001: unresolved external symbol __imp__masked_blit
1>explosion.obj : error LNK2001: unresolved external symbol __imp__allegro_errno
1>explosion.obj : error LNK2001: unresolved external symbol __imp__ftofix
1>explosion.obj : error LNK2001: unresolved external symbol __imp__rotate_scaled_sprite
1>explosion.obj : error LNK2001: unresolved external symbol __imp__ellipsefill
1>explosion.obj : error LNK2001: unresolved external symbol __imp__circle
1>explosion.obj : error LNK2001: unresolved external symbol __imp__triangle
1>files.obj : error LNK2001: unresolved external symbol __imp__set_clip_rect
1>floattext.obj : error LNK2001: unresolved external symbol __imp__hsv_to_rgb
1>floattext.obj : error LNK2001: unresolved external symbol __imp__rgb_to_hsv
1>gameloop.obj : error LNK2001: unresolved external symbol __imp__textprintf_ex
1>gameloop.obj : error LNK2001: unresolved external symbol __imp__textout_right_ex
1>gameloop.obj : error LNK2001: unresolved external symbol __imp___allegro_hline
1>globaldata.obj : error LNK2001: unresolved external symbol __imp___allegro_vline
1>globaldata.obj : error LNK2001: unresolved external symbol __imp__release_bitmap
1>globaldata.obj : error LNK2001: unresolved external symbol __imp__acquire_bitmap
1>land.obj : error LNK2001: unresolved external symbol __imp__solid_mode
1>menu.obj : error LNK2001: unresolved external symbol __imp__key
1>optionitembase.obj : error LNK2001: unresolved external symbol __imp__draw_sprite_v_flip
1>optionitembase.obj : error LNK2001: unresolved external symbol __imp__ellipse
1>player.obj : error LNK2001: unresolved external symbol __imp__save_bmp
1>player.obj : error LNK2001: unresolved external symbol __imp__key_shifts
1>shop.obj : error LNK2001: unresolved external symbol __imp__stretch_blit
1>shop.obj : error LNK2001: unresolved external symbol __imp__mouse_z
1>sky.obj : error LNK2001: unresolved external symbol __imp__set_add_blender
1>sound.obj : error LNK2001: unresolved external symbol __imp__play_sample
What should I do?
What it the problem?
I look at the other project that compile along the allegro lib. (that use the alleg.lib).
I add to atanks project at prepossess this lines:
_CRT_SECURE_NO_DEPRECATE
_CRT_NONSTDC_NO_DEPRECATE
ALLEGRO_STATICLINK
CMAKE_INTDIR="RelWithDebInfo"
Add more of necessary lib files, and then succeeded to compile and run.