[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

02/26/2001 at 08:29AM PST, ID: 20083737
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Those damn DLL's..should be an easy question

Asked by dooley in Windows MFC Programming

Tags: external, symbol, unresolved

I am trying to get a handle on DLL procedures. I know there are preprocssor directives and batch build files but I just wanted to do up a SIMPLE project so that I would understand the DLL linking process before trying any of the more advances stuff.
I basicly had in mind an app that would call a simple function in a DLL so that I could understand the process.
My MainApp is a simple dialog based app with a push button that should call the message box in the DLL.
The DLL builds with no problems.. 0 warnings  0 errors

However when I try to build the main app I get a linking error.

Does anyone have any ideas as to where I am going wrong??

To keep it VERY simple , I have not changed any compiler options other than to check the dependency in the MainApp program.

Thanks.

Here are some code samples.
Both projects were build using the wizard and reside in the same work space.
I manually copied the DLL,lib and exp file into the MainApp paths (all of the paths just ot be on the safe side).
It doesn't work!
MyDLL is a DLL project.
MyMainApp is the exe project.


MyDLL.h contains:
_declspec(dllexport) void ShowMeMessage();

MyDLL.cpp contains:
_declspec(dllexport)
void ShowMeMessage()
{
MessageBox(0,"This is inside the DLL","DLL SUCCESS",MB_OK);
}


MyMainApp.h contains..
_declspec(dllimport)ShowMeMessage();

MyMainAppDlg.CPP contains

#include "MyMainAppDlg.h"
#include "MyMainApp.h"


void CMyMainDlg::OnGetdll() //Push the Dialog buttonn and this should happen....
{
     // TODO: Add your control notification handler code here
     MessageBox("This is the button press","STILL INSIDE APP",MB_OK);
     ShowMeMessage();     // DLL function
}
Then the following error codes are generated..

Generating Code...
Linking...
MyMainAppDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl ShowMeMessage(void)" (__imp_?ShowMeMessage@@YAHXZ)
Debug/MyMainApp.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.
[+][-]02/26/01 09:53 AM, ID: 5880144

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Windows MFC Programming
Tags: external, symbol, unresolved
Sign Up Now!
Solution Provided By: christophm
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02/26/01 10:09 AM, ID: 5880201

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/26/01 03:53 PM, ID: 5881378

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74