Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Problem 2 missing symbols

Status
Not open for further replies.

scptre

Programmer
Oct 26, 2006
1
CA
I am having some problems with the linker.

Here is the build report it is giving me.

Code:
1>------ Build started: Project: WebHarmony, Configuration: Debug Win32 ------
1>Linking...
1>WHApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned long __thiscall RDXApp::AddWindow(class RDXWindow *)" (__imp_?AddWindow@RDXApp@@QAEKPAVRDXWindow@@@Z) referenced in function "public: virtual unsigned long __thiscall WHApp::OnInitApplication(void)" (?OnInitApplication@WHApp@@UAEKXZ)
1>WHApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: unsigned long __thiscall RDXApp::WndClassExReg(struct HBRUSH__ *,struct HICON__ *,struct HICON__ *,struct HICON__ *,char *,unsigned int)" (__imp_?WndClassExReg@RDXApp@@QAEKPAUHBRUSH__@@PAUHICON__@@11PADI@Z) referenced in function "public: virtual unsigned long __thiscall WHApp::OnInitApplication(void)" (?OnInitApplication@WHApp@@UAEKXZ)
1>C:\Programming\C++\WebEditor\WebHarmony\Debug\WebHarmony.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:\Programming\C++\WebEditor\WebHarmony\WebHarmony\Debug\BuildLog.htm"
1>WebHarmony - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========



And the function in question.

Code:
RRESULT WHApp::OnInitApplication()
{
	RRESULT rRet = R_OK;

	WndClassExReg((HBRUSH)(COLOR_APPWORKSPACE+1),LoadCursor(NULL,IDC_ARROW),LoadIcon(NULL,IDI_APPLICATION),LoadIcon(NULL,IDI_APPLICATION),NULL,CS_DBLCLKS);
	
	RDXWindow* newWindow = new RDXWindow();

	if(RDXFAILED(rRet = newWindow->RDXCreateWindow(800,600,0,0,WS_OVERLAPPEDWINDOW|WS_VISIBLE,m_strClassName,"Web Harmony",NULL)))
		return rRet;

	if(RDXFAILED(rRet = AddWindow(newWindow)))
		return rRet;

	return rRet;
}

The WHApp is a class that is based on another class RDXApp which is declared in another dll project
and theses are the only function from that dll that can't be found and there are alot of others in that class.

 
Have a look at the header. It should have the dllexport attribute when building the dll and dllimport for everyone else. Normally do this by some #define in the source code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top