By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,991 Members | 1,737 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,991 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
>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
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2

P: n/a
David Lowndes <da****@mvps.org> wrote in message news:<h4********************************@4ax.com>. ..
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


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
Nov 17 '05 #3

P: n/a
>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
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #4

P: n/a
David Lowndes <da****@mvps.org> wrote in message news:<6m********************************@4ax.com>. ..
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


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
Nov 17 '05 #5

P: n/a
>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.


Me neither :(

Merry Christmas
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.