argument list.
-karimulla.
Hi Karim,
It's tough to tell from your example, but I'd try recompiling all of the
lib's and the main code from scratch to see if the link errors get
resolved.
Looks like the other code change fixed your initial problem. I've found
that doing a Rebuild All can solve a lot of isuses as the later version
of
the compiler handles things a little differently. It's getting late and
the
example is a little difficult to read through, but it couldn't hurt to
try
the recompile.
Tom
"karim" <karim@discussions.microsoft.com> wrote in message
news:4813E15B-9621-449E-A4AE-FF89AA7E6102@microsoft.com...
Hi,
I'm moving my project from vc++6.0 to 2005 and i have some problems,
first
i
havecode in my .cpp like
========================================
BEGIN_MESSAGE_MAP(CSimCDMDispenseCP, CSimDialog)
//{{AFX_MSG_MAP(CSimCDMDispenseCP)
ON_WM_TIMER()
ON_WM_DESTROY()
ON_BN_CLICKED(ID_CDM_TAKE_CASH, OnTakeCash)
//}}AFX_MSG_MAP
ON_MESSAGE(PM_FIRSTDISPENSE, OnFirstDispense)
ON_MESSAGE(PM_NEXTDISPENSE, OnNextDispense)
END_MESSAGE_MAP()
===============================================
void CSimCDMDispenseCP:nFirstDispense(WPARAM, LPARAM)
{
.................
}
void CSimCDMDispenseCP:nNextDispense(WPARAM, LPARAM)
{
...............
}
=================================================
and in my header file code like
=================================================
afx_msg void OnFirstDispense(WPARAM wparam, LPARAM lparam);
afx_msg void OnNextDispense(WPARAM wparam, LPARAM lparam);
now the error i found with the above code is
==================================
Error C2440: 'static_cast' : cannot convert from 'void (__thiscall
CSimCDMDispenseCP::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::*
)(WPARAM,LPARAM)'
c:\TestSandBox\simcdm\source\SimCDMDispenseCP.cpp
106
i googled for help and i found some info from the following links
http://msdn2.microsoft.com/en-us/library/k35k2bfs(VS.80).aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=426068&SiteID=1
now i changed the code in my cpp like
===============================================
LRESULT CSimCDMDispenseCP:nFirstDispense(WPARAM, LPARAM)
{
.................
return 0L;
}
LRESULT CSimCDMDispenseCP:nNextDispense(WPARAM, LPARAM)
{
...............
return 0L;
}
=================================================
=================================================
and in my header file code like
=================================================
afx_msg LRESULT OnFirstDispense(WPARAM wparam, LPARAM lparam);
afx_msg LRESULT OnNextDispense(WPARAM wparam, LPARAM lparam);
=================================================
now here is my problem.there is a lot errors in my project like below
====================================
Error 56 error LNK2005: "public: __thiscall std::allocator<unsigned
short>::allocator<unsigned short>(void)" (??0?$allocator@G@std@@QAE@XZ)
already defined in ReadMixTables.obj msvcprt.lib
Error 60 error LNK2005: "class _variant_t vtMissing"
(?vtMissing@@3V_variant_t@@A) already defined in
comsuppw.lib(comutil.obj)
comsupp.lib
Error 61 error LNK2001: unresolved external symbol "public: __thiscall
CSimString::CSimString(unsigned short const *)"
(??0CSimString@@QAE@PBG@Z)
simwfp.lib
can any body please help me what went wrong here?
thanks in advance..........
-karimulla.