Use the following compile and link switches when building shared libraries on Windows.
compile and link switches
This example is for a DLL containing the my_plus function. You must include an EXPORT switch for the descriptor function for each UDF contained in the DLL.
cl /Zi /LD /I includefilepath my_main.cxx my_plus.cxx /link /map /INCREMENTAL:NO -EXPORT:extfn_use_new_api -EXPORT:my_plus /out:iqudf.dll