Linker error on VC 7 : unable to load ole32.dll

  • Thread starter Thread starter Pradnyesh Rane
  • Start date Start date
P

Pradnyesh Rane

Hi,

I am encountering the following linker error on VC7.

LINK : fatal error LNK1171: unable to load ole32.dll

This error is only encountered for the "Debug" configuration. The project
successfully compiles/links in "Release" configuration.

Any help is welcome.

Thanks,
Pradnyesh Rane
 
I am encountering the following linker error on VC7.
LINK : fatal error LNK1171: unable to load ole32.dll

This error is only encountered for the "Debug" configuration. The project
successfully compiles/links in "Release" configuration.

You probably have a reference to ole32.dll in the debug configuration
of your project's linker settings. Have you checked what's different
in the linker project settings between the release and debug builds?

Dave
 
David Lowndes said:
You probably have a reference to ole32.dll in the debug configuration
of your project's linker settings. Have you checked what's different
in the linker project settings between the release and debug builds?

Dave

Hi,

I have ole32.lib as a inherited value in Linker
Properties>Input>Additional Dependencies for both "Debug" and
"Release" configurations. I did not find ole32.dll in linker settings
for either configuration.

I did a diff of the BuildLog for the Debug and Release configurations.
There was no difference in the Environment Space variables.

In the verbose mode for Linker output I can see the following in
"Release configuration"

Found __IMPORT_DESCRIPTOR_ole32
Referenced in ole32.lib(ole32.dll)
Referenced in ole32.lib(ole32.dll)
Referenced in ole32.lib(ole32.dll)
Loaded ole32.lib(ole32.dll)

So ole32.lib is loaded successfully in "Release" configuration but is
failing in "Debug" mode for some reason.

I have $(VCInstallDir)PlatformSDK\lib in my Project Options for
directories to search for libraries. So ole32.lib should be accessible
to both configurations.



Any help is appreciated.

Thanks,
Pradnyesh
 
I have ole32.lib as a inherited value in Linker
Properties>Input>Additional Dependencies for both "Debug" and
"Release" configurations. I did not find ole32.dll in linker settings
for either configuration.

If both release and debug linker settings are consistent, I don't know
why it's happening. Have you tried removing the explicit references
and seeing what happens then?

Dave
 
David Lowndes said:
If both release and debug linker settings are consistent, I don't know
why it's happening. Have you tried removing the explicit references
and seeing what happens then?

Dave

Hi,

I emptied the contents of C:\Documents and Settings\<user>\Local
Settings\Application Data\Microsoft\VisualStudio

It started linking correctly in "Debug" configuration after that. I
still have no idea what went wrong or even why it started linking
correctly again.

Thanks Dave for your help.

Regards,
Pradnyesh
 
I emptied the contents of C:\Documents and Settings\ said:
Settings\Application Data\Microsoft\VisualStudio

It started linking correctly in "Debug" configuration after that. I
still have no idea what went wrong or even why it started linking
correctly again.

Me neither :(

Merry Christmas
Dave
 
Back
Top