ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Christian Saborío's Blog

The blog deals mostly with problems and their respective solutions that I find on day to day basis at my current workplace. Most of the issues so far deal specifically with Virtualization (mostly Microsoft related), 64-bit migration, and Windows 2003 issues. Many of the problems I have faced in various projects have been solved by reading someone else's blog. This is an effort to pay back and hopefully someone will be able to solve some of their problems by reading something within these pages.

Error while linking a C++ Application with Virtual Server

While trying to build a C++ application that tried to use the library from Virtual Server library VSComInterfaces.lib, we were getting a linker error that had us baffled for quite some time:

Error     1          error LNK2001: unresolved external symbol _IID_IVMVirtualServer  EnumVMs.obj    
Error     2          fatal error LNK1120: 1 unresolved externals          H:\Virtua\M01\Exercise-6\VMListing\Debug\VMListing.exe          

Searching for an answer in various search engines, only lead us back to where the example source code had originated:  http://windowssdk.msdn.microsoft.com/en-us/library/ms699581.aspx

We had no idea what was going on...we had brought the library from the C:\Program Files\Microsoft Virtual Server\Documentation directory from the server...the server...the x64  server!!!!

A quick check using dumpbin displayed the following info on the lib:


FILE HEADER VALUES
            8664 machine (x64)
               3 number of sections
        43589BDA time date stamp Fri Oct 21 00:42:18 2005
             57D file pointer to symbol table
              47 number of symbols
... 


We quickly compiled to 64-bit to see if the 64-bit library was indeed the culprit.  The app compiled without any problems!!

Bringing over the 32-bt lib file from a 32-bit Virtual Server allowed us to create the 32-bit version of the application and everything is back to normal.

Hopefully someone will find this post if they ever encounter the same problem in the future.

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Non-Commercial Edition), by Telligent Systems