0

I am not familiar with C/C++ but I have to use vsvars32.bat to build an executable file. When I run vsvars32.bat i get some unresolved external symbol errors. I did a little bit of research and it seems that they occur because the lib that contains the definition are not included (Unresolved external symbol in object files).

Here is a one of the error: libxml2.lib(error.obj) : error LNK2001: unresolved external symbol ___iob_func

I was provided the libxml2.lib file. I'm guessing that I'm getting this error because I need to copy it someplace where vsvars32.bat will look for it. I've been looking through the vsvars32.bat file and it looks like there's three libraries that are defined:

  • Windows SDK (%WindowsSdkDir%)
  • NETFXSDK (%NETFXSDKDir%)
  • UCRTVersion (%UCRTVersion%)

I was able to locate the NETFXSDK library folders on my machine but not the two others. I also noticed that I don't have any system variables named WindowsSdkDir, NETFXSDKDir or UCRTVersion. Is there something else that I should install or run? Am I on the totally wrong track?

Community
  • 1
  • 1
Jeremy L.
  • 136
  • 11
  • 2
    Not that it would make any difference but use `vcvarsall.bat` located under _%VSINSTALLDIR%\VC_ (that calls `vcvars32.bat` if no arguments given). Also, you need to be careful about the CPU architecture (it must be consistent across all modules). What is the _linker_ command? Note: _Windows SDK_ is automatically installed by _VStudio_ (btw: what is your version?) or can be also installed separately. I have no reference of _%UCRTVersion%_ in my file (_VStudio 10.0_). – CristiFati Sep 28 '16 at 17:42
  • I used `vcvarsall.bat` and as you said it didn't make a difference. I have Visual Studio Express 14.0. I have not written any of the files that need to be built. They are all included in the SDK downloadable here: https://resources.qtronic.de/fmusdk/FmuSdk_reference.html#installation – Jeremy L. Oct 03 '16 at 18:58
  • OK, what exactly are you trying to do? There are many pieces of the puzzle that simply don't connect. There is _VStudio_, then there is the _FMUSDK_ and _libxml2_ (and probably some other code of your own) that are totally unrelated. _vsvars32.bat_ is not used to build anything, it simply sets some env vars (which will be useful during build time). Please provide a [MCVE](http://stackoverflow.com/help/mcve), and don't let us guess what your error might be, and how can it be solved. – CristiFati Oct 07 '16 at 12:41

0 Answers0