简体   繁体   中英

Error Message when trying to debug dll (C++) with visual studio 2010

I use to write dll project under visual studio 2010 for excel. In order to debug it, I always did: right clic on the project -> debug -> start new instance, and it used to walk.

For to days now, it doesn't work anymore. I got the message : "Unable to start program : '...\\myDll.dll'."

The dll actually works normally, and I just want to check some results.

I don't know if an update could be the reason.

Has anybody encountered such a problem?

Regards

The error message would seem to indicate that the debugger is attempting to start a new process using your DLL as the host executable.

That cannot work. In order to debug your DLL, there needs to be a process that hosts the DLL. The DLL cannot stand alone. So, you need to specify in the debugger options that you want Excel to be the host executable.

In Visual Studio the setting is under Project | Properties | Configuration Properties | Debugging. You need to set the Command value to the executable that you wish to host your DLL.

Did you try clean the solution and rebuild it again? Make sure that your dll library file is updated after build.

Dont know if it helps

On seeing

"Unable to star program : '...\myDll.dll'."

Can you check your properties is path is correct ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM