mStudent
mStudent

Reputation: 1628

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

Upvotes: 0

Views: 422

Answers (3)

David Heffernan
David Heffernan

Reputation: 612954

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.

Upvotes: 2

MAG
MAG

Reputation: 3075

Dont know if it helps

On seeing

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

Can you check your properties is path is correct ?

Upvotes: 0

codelikeprogrammerwoman
codelikeprogrammerwoman

Reputation: 1569

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

Upvotes: 0

Related Questions