i've some code written as a dll in C++ in Visual Studio 2008. I've to be able to debug it. But i can't load dll in test exe. There isn't any problem on my test exe because when i try to load another dll there isn't any problem. Dll that given to me builded in debug unicode. Is it may be the cause of the problem? And how can i convert it to just debug mode? i really need your help., Thanks in advance.

Recommended Answers

All 5 Replies

If you have the source code, you can rebuild it with the option of the Unicode character set.

If you do not, you can change the calling project to use unicode (instead of MultiByte).

If your project has any MFC in it, you will need to change some of your function calls either with casts or different (safe) function calls for handling strings.

Yes i have the source code and it is already set Unicode character set. And in configuration it is set to Active(Debug Unicode). Is this set may be the reason of problem. How can i convert it only debug mode? I've got stuck and really need your help. Thanks..

I first need to know if you are mixing different forms of C++.
Does it have any MFC in it?
Does it have any native code in it?
Does it have C++/CLI in it?
Do you have the source code for the DLL?

If it combines MFC or CLI with native code, I suggest you recompile all of it with the Multibyte character set (in C++ project options).

If you have all of the source code, make one workspace with all of the projects included. Make sure the main project has "dependencies" checked for all of the other projects. Then do a "Rebuild All".

If it compiles, but still won't run, paste in the error message you get.

Ok, it doesn't have mfc, C++/CLI, and native code. And there is one workspace.
There is a static library in the same solution that some of dll sources uses this librarys functions. It compiles without errors. But when i try to load this dll in test.exe with LoadLibrary it fails. dll can not be loadded.
When i change debug mode to release mode and load release mode dll in text.exe there isn't any problem. i could't find where i'm doing mistake. Thanks for your help.

What is the specific error you get?
Is the DLL in the right directory?

Do you have the source code that creates the DLL?
If so:
1) add that project to your workspace
2) Set a dependency on that project
3) Re-Compile

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.