How to setup LIBPATH for link.exe - linker

I have some simple assembly code to test my compiler and linker:
bits 64
default rel
segment .data
msg db "Hello World!", 0xd, 0xa, 0
segment .text
global main
extern ExitProcess
extern _CRT_INIT
extern printf
main:
push rbp
mov rbp, rsp
sub rsp, 32
lea rcx, [msg]
call printf
xor rax, rax
call ExitProcess
I create an object file by running:
nasm -f win64 -o .\hello_world.obj .\hello_world.asm
I then try running this command since that's what I was instructed to do in the tutorial I'm following
link .\hello_world.obj /subsystem:console /entry:main /out:hello_world_basic.exe
It doesn't work and tells me that it's missing external symbols printf and ExitProcess, so I try and include some libraries in the linking stage:
link .\hello_world.obj /subsystem:console /entry:main /out:hello_world_basic.exe kernel32.lib legacy_stdio_definitions.lib msvcrt.lib
Now it's complaining that it can't find there libraries and I'm guessing there is some LIBPATH that I must specify.
I tried to create a LIBPATH by typing this into powershell:
$env:LIB += 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\lib\x64'
It seemed to include libraries from this path when I tried linking, but kernel32.lib isn't there and legacy_stdio_definitions.lib got a bunch of linking errors itself:
PS C:\Users\cyber\Code\Assembly> link .\hello_world.obj /subsystem:console /entry:main /out:hello_world_basic.exe legacy_stdio_definitions.lib msvcrt.lib
Microsoft (R) Incremental Linker Version 14.34.31937.0
Copyright (C) Microsoft Corporation. All rights reserved.
hello_world.obj : error LNK2001: unresolved external symbol ExitProcess
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __acrt_iob_func referenced in function _vwprintf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfwprintf referenced in function _vfwprintf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfwprintf_s referenced in function _vfwprintf_s_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfwprintf_p referenced in function _vfwprintf_p_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfwscanf referenced in function _vfwscanf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vswprintf referenced in function _vsnwprintf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vswprintf_s referenced in function _vswprintf_s_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vsnwprintf_s referenced in function _vsnwprintf_s_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vswprintf_p referenced in function _vswprintf_p_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vswscanf referenced in function _vswscanf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfprintf referenced in function _vfprintf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfprintf_s referenced in function _vfprintf_s_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfprintf_p referenced in function _vfprintf_p_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vfscanf referenced in function _vfscanf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf referenced in function _vsnprintf_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_s referenced in function _vsprintf_s_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vsnprintf_s referenced in function _vsnprintf_s_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vsprintf_p referenced in function _vsprintf_p_l
legacy_stdio_definitions.lib(legacy_stdio_definitions.obj) : error LNK2019: unresolved external symbol __stdio_common_vsscanf referenced in function _vsscanf_l
hello_world_basic.exe : fatal error LNK1120: 20 unresolved externals
How do I manage to link with these libraries properly and what is their path?

Related

Windows linking to libcurl_a.lib

I built libcurl following the instructions for building libcurl as a static library in the curl/winbuild directory to the letter. It spat out a libcurl_a.lib, a collection of .h files, which I moved into folders that I promptly added to the PATH. I then attempt to build my program with the command
cl (*my source files*) /IC:/PATH_addon/include libcurl_a.lib Ws2_32.lib Wldap32.lib /DCURL_STATICLIB /link /LIBPATH:C:/PATH_addon/lib
Note:
I am building from the command line as the code was not written in an IDE, or on this machine
C:/PATH_addon/ is a folder where I dump all the things that need to be linked into path (it is linked to my path) so that I don't pollute the default path, or my system32 folder
However when I run the command, it tells me that there are 12 unresolved symbols:
libcurl_a.lib(tftp.obj) : error LNK2001: unresolved external symbol __imp___time64
libcurl_a.lib(cookie.obj) : error LNK2001: unresolved external symbol __imp___time64
libcurl_a.lib(hostip.obj) : error LNK2001: unresolved external symbol __imp___time64
libcurl_a.lib(http.obj) : error LNK2001: unresolved external symbol __imp___time64
libcurl_a.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp___time64
libcurl_a.lib(telnet.obj) : error LNK2001: unresolved external symbol __imp__strncpy
libcurl_a.lib(curl_sspi.obj) : error LNK2001: unresolved external symbol __imp__strncpy
libcurl_a.lib(url.obj) : error LNK2001: unresolved external symbol __imp__strncpy
libcurl_a.lib(strerror.obj) : error LNK2001: unresolved external symbol __imp__strncpy
libcurl_a.lib(ftp.obj) : error LNK2001: unresolved external symbol __imp__strncpy
libcurl_a.lib(warnless.obj) : error LNK2019: unresolved external symbol __imp__read referenced in function _curlx_read
OLDNAMES.lib(read.obi) : error LNK2001: unresolved external symbol __imp__read
libcurl_a.lib(warnless.obj) : error LNK2019: unresolved external symbol __imp__write referenced in function _curlx_write
OLDNAMES.lib(write.obi) : error LNK2001: unresolved external symbol __imp__write
libcurl_a.lib(parsedate.obj) : error LNK2019: unresolved external symbol __imp___gmtime64 referenced in function _Curl_gmtime
libcurl_a.lib(strerror.obj) : error LNK2019: unresolved external symbol __imp__strerror referenced in function _Curl_strerror
libcurl_a.lib(curl_threads.obj) : error LNK2019: unresolved external symbol __imp___beginthreadex referenced in function _Curl_thread_create
libcurl_a.lib(smb.obj) : error LNK2019: unresolved external symbol __imp___getpid referenced in function _smb_format_message
libcurl_a.lib(file.obj) : error LNK2019: unresolved external symbol __imp__close referenced in function _file_done
OLDNAMES.lib(close.obi) : error LNK2001: unresolved external symbol __imp__close
libcurl_a.lib(file.obj) : error LNK2019: unresolved external symbol __imp__open referenced in function _file_connect
OLDNAMES.lib(open.obi) : error LNK2001: unresolved external symbol __imp__open
libcurl_a.lib(mime.obj) : error LNK2019: unresolved external symbol __imp__access referenced in function _curl_mime_filedata
OLDNAMES.lib(access.obi) : error LNK2001: unresolved external symbol __imp__access
MSVCRT.lib(_chandler4gs_.obj) : error LNK2019: unresolved external symbol __except_handler4_common referenced in function __except_handler4
Why can't these symbols be resolved, and is there a way to fix this?
Solution (thanks in part to the incredible #Hans Passant):
Adding the /NODEFAULTLIB:LIBCMT flag fixed the issue and allowed for a successful compile and execution.

Create DLL file from .c

i'm tring to create a .dll file from this .c code (for Labview).
http://www.mathworks.com/matlabcentral/fileexchange/26190-vchoosek
But i'm not able to compile it nor with VisualStudio nor with "mcc" because both compilers return this error:
VChooseK.obj : error LNK2019: unresolved external symbol mexErrMsgIdAndTxt referenced in function BadInputTypeError
VChooseK.obj : error LNK2019: unresolved external symbol mxFree referenced in function ElemK_8Byte
VChooseK.obj : error LNK2019: unresolved external symbol mxMalloc referenced in function ElemK_8Byte
VChooseK.obj : error LNK2019: unresolved external symbol mxGetData referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxGetPr referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxGetElementSize referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mexWarnMsgIdAndTxt referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxCreateNumericMatrix_730 referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxGetClassID referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxSetN_730 referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxSetM_730 referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxDuplicateArray referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxGetScalar referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxGetNumberOfElements referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxIsDouble referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxIsLogical referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxIsChar referenced in function mexFunction
VChooseK.obj : error LNK2019: unresolved external symbol mxIsNumeric referenced in function mexFunction
Someone could help me?
I've already include the path of "mex.h" in VisualStudio
You must include the important libraries for linking. The libraries like libmex.lib;libmat.lib;libmx.lib and others if needed.
If you are using the MATLAB 2018b, the include path must include "C:\Program Files\MATLAB\R2018b\extern\include" and Library Path "C:\Program Files\MATLAB\R2018b\extern\lib\win64\microsoft".

Fatal error LNK1120 when compiling c project

I tried to compile main.c from this project Emacs-FullScreen-Win32 by using visual studio developer command prompt but I get the following error:
main.c
Microsoft (R) Incremental Linker Version 11.00.60610.1
Copyright (C) Microsoft Corporation. All rights reserved.
/out:main.exe
main.obj
main.obj : error LNK2019: unresolved external symbol __imp__ShowWindowAsync#8 re
ferenced in function _WinMain#16
main.obj : error LNK2019: unresolved external symbol __imp__SetWindowPos#28 refe
renced in function _WinMain#16
main.obj : error LNK2019: unresolved external symbol __imp__MessageBoxW#16 refer
enced in function _WinMain#16
main.obj : error LNK2019: unresolved external symbol __imp__GetWindowLongW#8 ref
erenced in function _WinMain#16
main.obj : error LNK2019: unresolved external symbol __imp__SetWindowLongW#12 re
ferenced in function _WinMain#16
main.obj : error LNK2019: unresolved external symbol __imp__FindWindowW#8 refere
nced in function _WinMain#16
main.obj : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW#8
referenced in function _is_topmost_requested
main.exe : fatal error LNK1120: 7 unresolved externals
Those unresolved external problems are likely due to you not properly linking the libraries that those functions are from. In your project settings, go to project properties. Expand configuration properties, then expand linker. In the linker's input settings, you can specify libraries that the program requires in the "additional dependencies" option.

vtk tcl wrapping

I'm trying to build VTK with VTK_WRAP_TCL=ON and VTK_USE_TK=ON but having following linker errors:
> Compiling...
vtkTkAppInit.cxx
Compiling resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
Creating library D:\VTK\bin\bin\Debug\vtk.lib and object D:\VTK\bin\bin\Debug\vtk.exp
vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tk_MainEx referenced in function _main
vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_CreateInterp referenced in function _main
vtkCommonTCL.lib(vtkTclUtil.obj) : error LNK2001: unresolved external symbol __imp__Tcl_CreateInterp
vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_SetVar referenced in function _Tcl_AppInit
vtkCommonTCL.lib(vtkTclUtil.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SetVar
vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_Eval referenced in function _Tcl_AppInit
vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tk_Init referenced in function _Tcl_AppInit
vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_Init referenced in function _Tcl_AppInit
vtkCommonTCL.lib(vtkTclUtil.obj) : error LNK2019: unresolved external symbol __imp__Tcl_GetAssocData referenced in function "struct vtkTclInterpStruct * __cdecl vtkGetInterpStruct(struct Tcl_Interp *)" (?vtkGetInterpStruct##YAPAUvtkTclInterpStruct##PAUTcl_Interp###Z)
vtkFilteringTCL.lib(vtkSourceTcl.obj) : error LNK2019: unresolved external symbol __imp__Tcl_DeleteCommand referenced in function "int __cdecl vtkSourceCppCommand(class vtkSource *,struct Tcl_Interp *,int,char * * const)" (?vtkSourceCppCommand##YAHPAVvtkSource##PAUTcl_Interp##HQAPAD#Z)
vtkRenderingTCL.lib(vtkAbstractVolumeMapperTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkRenderingTCL.lib(vtkImporterTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkWidgetsTCL.lib(vtkContinuousValueWidgetRepresentationTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkProcessObjectTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkMapper2DTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkViewportTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkAbstractMapperTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkThreadedImageAlgorithmTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkImageInPlaceFilterTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
vtkFilteringTCL.lib(vtkRectilinearGridSourceTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand
.
.
D:\VTK\bin\bin\Debug\vtk.exe : fatal error LNK1120: 65 unresolved externals
Results
Build log was saved at "file://d:\VTK\bin\Wrapping\Tcl\vtk.dir\Debug\BuildLog.htm"
vtk - 22432 error(s), 0 warning(s)
Please help to solve.
Thanks.
I installed Tclx64 version and was trying to build it with 32 bit compiler.
Problem is solved by installing x86 version and compiled it with Debug|Win32.
http://public.kitware.com/pipermail/vtkusers/2011-September/118696.html this post helped me to understand the problem.

unresolved external symbol with glib and VS C++

Compiling FluidSynth 1.1.1 from source. I have unresolved external symbol with glib, using Visual C++ Express 2010, how do I actually link the glib.lib correctly in the IDE? Do I need wsock libraries as well?
1>------ Build started: Project: fluidsynth_dll, Configuration: Release Win32 ------
2>------ Build started: Project: fluidsynth_lib, Configuration: Release Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth_dll\.\Release\fluidsynth_dll.dll) does not match the Linker's OutputFile property value (C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(fluidsynth_dll) does not match the Linker's OutputFile property value (fluidsynth). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2> fluid_adriver.c
1> Creating library .\Release/fluidsynth.lib and object .\Release/fluidsynth.exp
1>fluid_voice.obj : error LNK2019: unresolved external symbol _g_atomic_int_add referenced in function _new_fluid_voice
1>fluid_chan.obj : error LNK2001: unresolved external symbol _g_atomic_int_add
1>fluid_hash.obj : error LNK2001: unresolved external symbol _g_atomic_int_add
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_atomic_int_add
1>fluid_tuning.obj : error LNK2001: unresolved external symbol _g_atomic_int_add
1>fluid_chan.obj : error LNK2019: unresolved external symbol _g_atomic_int_compare_and_exchange referenced in function _fluid_channel_set_sfont_bank_prog
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_atomic_int_compare_and_exchange
1>fluid_synth.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_sys.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_winmidi.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_cmd.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_event.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_seq.obj : error LNK2001: unresolved external symbol __imp__g_thread_functions_for_glib_use
1>fluid_cmd.obj : error LNK2019: unresolved external symbol _g_static_mutex_get_mutex_impl referenced in function _fluid_server_add_client
1>fluid_event.obj : error LNK2001: unresolved external symbol _g_static_mutex_get_mutex_impl
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol _g_static_mutex_get_mutex_impl
1>fluid_seq.obj : error LNK2001: unresolved external symbol _g_static_mutex_get_mutex_impl
1>fluid_settings.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_synth.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_sys.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_winmidi.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_cmd.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_event.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_seq.obj : error LNK2001: unresolved external symbol __imp__g_threads_got_initialized
1>fluid_cmd.obj : error LNK2019: unresolved external symbol _g_static_mutex_init referenced in function _new_fluid_server
1>fluid_event.obj : error LNK2001: unresolved external symbol _g_static_mutex_init
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol _g_static_mutex_init
1>fluid_seq.obj : error LNK2001: unresolved external symbol _g_static_mutex_init
1>fluid_settings.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_thread_init referenced in function _fluid_synth_cc_LOCAL
1>fluid_sys.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_winmidi.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_cmd.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_event.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_seq.obj : error LNK2001: unresolved external symbol _g_thread_init
1>fluid_event.obj : error LNK2019: unresolved external symbol _g_static_mutex_free referenced in function __fluid_evt_heap_free
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol _g_static_mutex_free
1>fluid_seq.obj : error LNK2001: unresolved external symbol _g_static_mutex_free
1>fluid_settings.obj : error LNK2019: unresolved external symbol _g_log referenced in function _new_fluid_str_setting
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_sys.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_tuning.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_event_queue.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_filerenderer.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_hash.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_midi_router.obj : error LNK2001: unresolved external symbol _g_log
1>fluid_hash.obj : error LNK2019: unresolved external symbol _g_atomic_int_exchange_and_add referenced in function _fluid_hashtable_unref
1>fluid_settings.obj : error LNK2019: unresolved external symbol _g_static_rec_mutex_free referenced in function _delete_fluid_settings
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_static_rec_mutex_free
1>fluid_settings.obj : error LNK2019: unresolved external symbol _g_static_rec_mutex_unlock referenced in function _fluid_settings_get_type
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_static_rec_mutex_unlock
1>fluid_settings.obj : error LNK2019: unresolved external symbol _g_static_rec_mutex_lock referenced in function _fluid_settings_get_type
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_static_rec_mutex_lock
1>fluid_settings.obj : error LNK2019: unresolved external symbol _g_static_rec_mutex_init referenced in function _new_fluid_settings
1>fluid_synth.obj : error LNK2001: unresolved external symbol _g_static_rec_mutex_init
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_static_private_free referenced in function _delete_fluid_synth
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_thread_self referenced in function _fluid_synth_alloc_voice
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_static_private_set referenced in function _fluid_synth_tuning_iteration_start
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_static_private_get referenced in function _fluid_synth_tuning_iteration_next
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_atomic_pointer_compare_and_exchange referenced in function _fluid_synth_get_event_queue
1>fluid_synth.obj : error LNK2019: unresolved external symbol _g_static_private_init referenced in function _new_fluid_synth
1>fluid_sys.obj : error LNK2019: unresolved external symbol _g_get_current_time referenced in function _fluid_curtime
1>fluid_sys.obj : error LNK2019: unresolved external symbol _g_clear_error referenced in function _new_fluid_thread
1>fluid_sys.obj : error LNK2019: unresolved external symbol _g_thread_create_full referenced in function _new_fluid_thread
1>fluid_sys.obj : error LNK2019: unresolved external symbol _g_thread_join referenced in function _fluid_thread_join
1>fluid_sys.obj : error LNK2019: unresolved external symbol _g_usleep referenced in function _fluid_timer_run
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__recv#16 referenced in function _fluid_istream_gets
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__send#16 referenced in function _fluid_ostream_printf
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__closesocket#4 referenced in function _fluid_socket_close
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError#0 referenced in function _fluid_server_socket_run
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__inet_ntoa#4 referenced in function _fluid_server_socket_run
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__accept#12 referenced in function _fluid_server_socket_run
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__listen#8 referenced in function _new_fluid_server_socket
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__bind#12 referenced in function _new_fluid_server_socket
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__htonl#4 referenced in function _new_fluid_server_socket
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__htons#4 referenced in function _new_fluid_server_socket
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__WSACleanup#0 referenced in function _new_fluid_server_socket
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__socket#12 referenced in function _new_fluid_server_socket
1>fluid_sys.obj : error LNK2019: unresolved external symbol __imp__WSAStartup#8 referenced in function _new_fluid_server_socket
1>../fluidsynth.dll : fatal error LNK1120: 38 unresolved externals
3>------ Build started: Project: fluidsynth, Configuration: Release Win32 ------
2> fluid_aufile.c
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth\.\Release\fluidsynth.exe) does not match the Linker's OutputFile property value (C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
2> fluid_chan.c
2> fluid_chorus.c
3> fluidsynth.vcxproj -> C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth\.\Release\fluidsynth.exe
2> fluid_cmd.c
2> fluid_conv.c
2> fluid_defsfont.c
2> fluid_dll.c
2> fluid_dsound.c
2> fluid_dsp_float.c
2> fluid_event.c
2> fluid_event_queue.c
2> fluid_filerenderer.c
2> fluid_gen.c
2> fluid_hash.c
2> fluid_list.c
2> fluid_mdriver.c
2> fluid_midi.c
2> fluid_midi_router.c
2> fluid_mod.c
2> Generating Code...
2> Compiling...
2> fluid_ramsfont.c
2> fluid_rev.c
2> fluid_seq.c
2> fluid_seqbind.c
2> fluid_settings.c
2> fluid_synth.c
2> fluid_sys.c
2> fluid_tuning.c
2> fluid_voice.c
2> fluid_winmidi.c
2> Generating Code...
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth_lib\.\Release\fluidsynth_lib.lib) does not match the Library's OutputFile property value (C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth_lib.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
2> fluidsynth_lib.vcxproj -> C:\Users\Wildfire\Desktop\fluidsynth-1.1.1\winbuild\fluidsynth_lib\.\Release\fluidsynth_lib.lib
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Since you have already resolved most of your problems, and are just missing the winsock stuff.
You need to install the Windows Platform SDK, which will install a lot of libraries. In the install location's lib directory will be the file ws2_32.lib, which is the Winsock2 library you want to link against.
You need to link to the ws2_32.lib file, which, as birryree mentions, is a Winsock2 library. However, if you don't know how to link this in, here are the instructions as outlined in this MSDN Thread:
In your project properties:
Configuration Properties, Linker, Input, Additional Dependencies.
Then add ws2_32.lib to the semi-colon separated list.

Resources