Link to home
Start Free TrialLog in
Avatar of Tamije
Tamije

asked on

LNK2005 Error

Can somebody please help me to solve this error.

Linking...
comsuppd.lib(comutil.obj) : error LNK2005: "class _variant_t vtMissing" (?vtMissing@@3V_variant_t@@A) already defined in comsuppwd.lib(comutil.obj)
Debug/LoadFlow.exe : fatal error LNK1169: one or more multiply defined symbols found

Thanks
Tamije
Avatar of jkr
jkr
Flag of Germany image

It seems that you are for some reaon linking with both the UNICODE and ANSI versions of 'commsupp(d).lib'. Can you check your project settings to see whether both are explicitly listed there?
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tamije
Tamije

ASKER

Thanks jkr

Can you please tell me how to set the compiler options.

Tamije
Avatar of Tamije

ASKER

If it is of any help...

this linker error started coming up only after I added the following code.

 RegisterProperty(OD_SWINGBUS_VOLTAGE_MAG,
              _T("VoltageMag"),
              _T("Magnitude of Voltage at the Swing Bus"),
              _PropertyAccessor(&CSwingBusProperties::GetVoltageMag,
                                               &CSwingBusProperties::SetVoltageMag)
              );
      
Avatar of Tamije

ASKER

Hi jkr

I figured out where to set the compiler options. The "treat wchar_t as built-in type" option was already enabled. I disabled it and build my project and the link error disappeared.

Thank you very much for your help.

Tamije

Sorry for being a bit slow...

You're most welcome :o)