begin process at 2012 05 29 08:27:55
  Trouver un code source :
 
dans
 
Accueil > Forum > 

C++ & C++ .NET

 > 

Windows

 > 

MFC

 > 

erreur LNK


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

erreur LNK

mercredi 20 août 2008 à 13:52:05 | erreur LNK

olfa7183

salut
j'ai un petit projet programmé sur visual studio 6.0. lors de compilation il n'y a aucune erreur mais lors d'exécution il me parait ça:


--------------------Configuration: Monnayeur - Win32 Debug--------------------
Linking...
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::Poll(int *,struct CCTALK_BILLEVENT * const)" (?Poll@CBillValidator@@QAEHPAHQAUCCTALK_BILLEVENT@@@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CcTalkDevice::Reset(void)" (?Reset@CcTalkDevice@@QAEHXZ)
ccDLL_CoinSelector.obj : error LNK2001: unresolved external symbol "public: int __thiscall CcTalkDevice::Reset(void)" (?Reset@CcTalkDevice@@QAEHXZ)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::GetBillStatus(struct CCTALK_BILLENTRY * const)" (?GetBillStatus@CBillValidator@@QAEHQAUCCTALK_BILLENTRY@@@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::SetBillEnable(struct CCTALK_BILLENTRY * const)" (?SetBillEnable@CBillValidator@@QAEHQAUCCTALK_BILLENTRY@@@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::GetMasterInhibit(int *)" (?GetMasterInhibit@CBillValidator@@QAEHPAH@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::SetMasterInhibit(int)" (?SetMasterInhibit@CBillValidator@@QAEHH@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::GetEscrowEnable(int *)" (?GetEscrowEnable@CBillValidator@@QAEHPAH@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::SetEscrowEnable(int)" (?SetEscrowEnable@CBillValidator@@QAEHH@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CBillValidator::RouteBill(int)" (?RouteBill@CBillValidator@@QAEHH@Z)
ccDLL_BillValidator.obj : error LNK2001: unresolved external symbol "public: int __thiscall CcTalkDevice::ChangePINCode(unsigned char *)" (?ChangePINCode@CcTalkDevice@@QAEHPAE@Z)
ccDLL_CoinSelector.obj : error LNK2001: unresolved external symbol "public: int __thiscall CCoinSelector::GetCoinStatus(struct CCTALK_COINENTRY * const)" (?GetCoinStatus@CCoinSelector@@QAEHQAUCCTALK_COINENTRY@@@Z)
ccDLL_CoinSelector.obj : error LNK2001: unresolved external symbol "public: int __thiscall CCoinSelector::SetCoinEnable(struct CCTALK_COINENTRY * const)" (?SetCoinEnable@CCoinSelector@@QAEHQAUCCTALK_COINENTRY@@@Z)
ccDLL_CoinSelector.obj : error LNK2001: unresolved external symbol "public: int __thiscall CCoinSelector::Poll(int *,struct CCTALK_COINEVENT * const)" (?Poll@CCoinSelector@@QAEHPAHQAUCCTALK_COINEVENT@@@Z)
Debug/Monnayeur.exe : fatal error LNK1120: 13 unresolved externals
Error executing link.exe.

Monnayeur.exe - 15 error(s), 1 warning(s)


voila mon programme:
*ccDLL_BillValidator.cpp

#include "stdafx.h"
#include "ccDLL_Test.h"
#include "ccDLL_BillValidator.h"

 

// ccDLL_BillValidator-Dialogfeld

IMPLEMENT_DYNAMIC(ccDLL_BillValidator, CDialog)


ccDLL_BillValidator::ccDLL_BillValidator(CWnd* pParent /*=NULL*/)
 : CDialog(ccDLL_BillValidator::IDD_BILLVALIDATOR, pParent)
 , m_Val00(_T(""))
 , m_Val01(_T(""))
 , m_Val02(_T(""))
 , m_Val03(_T(""))
 , m_Val04(_T(""))
 , m_Val05(_T(""))
 , m_Val06(_T(""))
 , m_Val07(_T(""))
 , m_Val08(_T(""))
 , m_Val09(_T(""))
 , m_Val10(_T(""))
 , m_Val11(_T(""))
 , m_Val12(_T(""))
 , m_Val14(_T(""))
 , m_Val15(_T(""))
 , m_Val13(_T(""))
 , m_Curr00(_T(""))
 , m_Curr01(_T(""))
 , m_Curr02(_T(""))
 , m_Curr03(_T(""))
 , m_Curr04(_T(""))
 , m_Curr05(_T(""))
 , m_Curr06(_T(""))
 , m_Curr07(_T(""))
 , m_Curr08(_T(""))
 , m_Curr09(_T(""))
 , m_Curr10(_T(""))
 , m_Curr11(_T(""))
 , m_Curr12(_T(""))
 , m_Curr13(_T(""))
 , m_Curr14(_T(""))
 , m_Curr15(_T(""))
 , m_Enab00(FALSE)
 , m_Enab01(FALSE)
 , m_Enab02(FALSE)
 , m_Enab03(FALSE)
 , m_Enab04(FALSE)
 , m_Enab05(FALSE)
 , m_Enab06(FALSE)
 , m_Enab07(FALSE)
 , m_Enab08(FALSE)
 , m_Enab09(FALSE)
 , m_Enab10(FALSE)
 , m_Enab11(FALSE)
 , m_Enab12(FALSE)
 , m_Enab13(FALSE)
 , m_Enab14(FALSE)
 , m_Enab15(FALSE)
 , m_LastBill(_T(""))
 , m_DoPoll(FALSE)
 , m_MasterInhibit(FALSE)
 , m_EscrowEnable(FALSE)
 , m_Result(0)
 , m_PIN(_T("123456"))
{
 m_values[ 0] = &m_Val00;
 m_values[ 1] = &m_Val01;
 m_values[ 2] = &m_Val02;
 m_values[ 3] = &m_Val03;
 m_values[ 4] = &m_Val04;
 m_values[ 5] = &m_Val05;
 m_values[ 6] = &m_Val06;
 m_values[ 7] = &m_Val07;
 m_values[ 8] = &m_Val08;
 m_values[ 9] = &m_Val09;
 m_values[10] = &m_Val10;
 m_values[11] = &m_Val11;
 m_values[12] = &m_Val12;
 m_values[13] = &m_Val13;
 m_values[14] = &m_Val14;
 m_values[15] = &m_Val15;
 m_currencies[ 0] = &m_Curr00;
 m_currencies[ 1] = &m_Curr01;
 m_currencies[ 2] = &m_Curr02;
 m_currencies[ 3] = &m_Curr03;
 m_currencies[ 4] = &m_Curr04;
 m_currencies[ 5] = &m_Curr05;
 m_currencies[ 6] = &m_Curr06;
 m_currencies[ 7] = &m_Curr07;
 m_currencies[ 8] = &m_Curr08;
 m_currencies[ 9] = &m_Curr09;
 m_currencies[10] = &m_Curr10;
 m_currencies[11] = &m_Curr11;
 m_currencies[12] = &m_Curr12;
 m_currencies[13] = &m_Curr13;
 m_currencies[14] = &m_Curr14;
 m_currencies[15] = &m_Curr15;
 m_enables[ 0] = &m_Enab00;
 m_enables[ 1] = &m_Enab01;
 m_enables[ 2] = &m_Enab02;
 m_enables[ 3] = &m_Enab03;
 m_enables[ 4] = &m_Enab04;
 m_enables[ 5] = &m_Enab05;
 m_enables[ 6] = &m_Enab06;
 m_enables[ 7] = &m_Enab07;
 m_enables[ 8] = &m_Enab08;
 m_enables[ 9] = &m_Enab09;
 m_enables[10] = &m_Enab10;
 m_enables[11] = &m_Enab11;
 m_enables[12] = &m_Enab12;
 m_enables[13] = &m_Enab13;
 m_enables[14] = &m_Enab14;
 m_enables[15] = &m_Enab15;

 m_tmrid = 0;
}

ccDLL_BillValidator::~ccDLL_BillValidator()
{
}


void ccDLL_BillValidator::DoDataExchange(CDataExchange* pDX)
{
 CDialog::DoDataExchange(pDX);
 DDX_Text(pDX, IDC_EDIT1, m_Val00);
 DDX_Text(pDX, IDC_EDIT11, m_Val01);
 DDX_Text(pDX, IDC_EDIT13, m_Val02);
 DDX_Text(pDX, IDC_EDIT15, m_Val03);
 DDX_Text(pDX, IDC_EDIT17, m_Val04);
 DDX_Text(pDX, IDC_EDIT19, m_Val05);
 DDX_Text(pDX, IDC_EDIT21, m_Val06);
 DDX_Text(pDX, IDC_EDIT23, m_Val07);
 DDX_Text(pDX, IDC_EDIT25, m_Val08);
 DDX_Text(pDX, IDC_EDIT27, m_Val09);
 DDX_Text(pDX, IDC_EDIT29, m_Val10);
 DDX_Text(pDX, IDC_EDIT31, m_Val11);
 DDX_Text(pDX, IDC_EDIT33, m_Val12);
 DDX_Text(pDX, IDC_EDIT37, m_Val14);
 DDX_Text(pDX, IDC_EDIT39, m_Val15);
 DDX_Text(pDX, IDC_EDIT35, m_Val13);
 DDX_Text(pDX, IDC_EDIT10, m_Curr00);
 DDX_Text(pDX, IDC_EDIT14, m_Curr02);
 DDX_Text(pDX, IDC_EDIT16, m_Curr03);
 DDX_Text(pDX, IDC_EDIT18, m_Curr04);
 DDX_Text(pDX, IDC_EDIT20, m_Curr05);
 DDX_Text(pDX, IDC_EDIT22, m_Curr06);
 DDX_Text(pDX, IDC_EDIT24, m_Curr07);
 DDX_Text(pDX, IDC_EDIT26, m_Curr08);
 DDX_Text(pDX, IDC_EDIT28, m_Curr09);
 DDX_Text(pDX, IDC_EDIT30, m_Curr10);
 DDX_Text(pDX, IDC_EDIT32, m_Curr11);
 DDX_Text(pDX, IDC_EDIT34, m_Curr12);
 DDX_Text(pDX, IDC_EDIT36, m_Curr13);
 DDX_Text(pDX, IDC_EDIT38, m_Curr14);
 DDX_Text(pDX, IDC_EDIT40, m_Curr15);
 DDX_Check(pDX, IDC_CHECK1, m_Enab00);
 DDX_Check(pDX, IDC_CHECK2, m_Enab01);
 DDX_Check(pDX, IDC_CHECK3, m_Enab02);
 DDX_Check(pDX, IDC_CHECK4, m_Enab03);
 DDX_Check(pDX, IDC_CHECK5, m_Enab04);
 DDX_Check(pDX, IDC_CHECK6, m_Enab05);
 DDX_Check(pDX, IDC_CHECK7, m_Enab06);
 DDX_Check(pDX, IDC_CHECK8, m_Enab07);
 DDX_Check(pDX, IDC_CHECK9, m_Enab08);
 DDX_Check(pDX, IDC_CHECK10, m_Enab09);
 DDX_Check(pDX, IDC_CHECK11, m_Enab10);
 DDX_Check(pDX, IDC_CHECK12, m_Enab11);
 DDX_Check(pDX, IDC_CHECK13, m_Enab12);
 DDX_Check(pDX, IDC_CHECK14, m_Enab13);
 DDX_Check(pDX, IDC_CHECK15, m_Enab14);
 DDX_Check(pDX, IDC_CHECK16, m_Enab15);
 DDX_Text(pDX, IDC_EDIT41, m_LastBill);
 DDX_Check(pDX, IDC_CHECK17, m_DoPoll);
 DDX_Check(pDX, IDC_CHKINHIBIT, m_MasterInhibit);
 DDX_Control(pDX, IDC_CBXBILLROUTE, m_cbxBillRoute);
 DDX_Text(pDX, IDC_EDIT49, m_PIN);
}


BEGIN_MESSAGE_MAP(ccDLL_BillValidator, CDialog)
 ON_BN_CLICKED(IDC_BTNREAD, ccDLL_BillValidator::OnBnClickedBtnread)
 ON_BN_CLICKED(IDCANCEL, ccDLL_BillValidator::OnBnClickedCancel)
 ON_BN_CLICKED(IDC_CHECK17, ccDLL_BillValidator::OnBnClickedCheck17)
 ON_WM_CLOSE()
 ON_WM_TIMER()
 ON_BN_CLICKED(IDC_BTNRESET, ccDLL_BillValidator::OnBnClickedBtnreset)
 ON_BN_CLICKED(IDC_BTNSET, ccDLL_BillValidator::OnBnClickedBtnset)
 ON_BN_CLICKED(IDC_BTNINHIBIT, ccDLL_BillValidator::OnBnClickedBtninhibit)
 ON_BN_CLICKED(IDC_BTNINHIBIT2, ccDLL_BillValidator::OnBnClickedBtninhibit2)
 ON_BN_CLICKED(IDC_BTNESCROW2, ccDLL_BillValidator::OnBnClickedBtnescrow2)
 ON_WM_SHOWWINDOW()
 ON_BN_CLICKED(IDC_BTNROUTEBILL, ccDLL_BillValidator::OnBnClickedBtnroutebill)
 ON_BN_CLICKED(IDC_BTNCHANGEPIN, ccDLL_BillValidator::OnBnClickedBtnchangepin)
END_MESSAGE_MAP()


// ccDLL_BillValidator-Meldungshandler


void ccDLL_BillValidator::OnShowWindow(BOOL bShow, UINT nStatus)
{
 CDialog::OnShowWindow(bShow, nStatus);

 m_cbxBillRoute.AddString("Return");
 m_cbxBillRoute.AddString("Stack");
 m_cbxBillRoute.AddString("Extend");
 m_cbxBillRoute.SetCurSel(0);
}


void ccDLL_BillValidator::OnBnClickedCancel()
{
 OnCancel();
}

void ccDLL_BillValidator::OnClose()
{
 if (m_tmrid != NULL)
 {
  int res = KillTimer(m_tmrid);
  if (res) m_tmrid = NULL;
 }


 CDialog::OnClose();
}


void ccDLL_BillValidator::OnBnClickedCheck17()
{
 if (m_tmrid != NULL)
 {
  int res = KillTimer(m_tmrid);
  if (res) m_tmrid = NULL;
 }
 UpdateData(1);
 if (m_DoPoll)
 {
  m_tmrid = SetTimer(1, 200, NULL);
 }
}

// Poll the valdator
void ccDLL_BillValidator::OnTimer(UINT_PTR nIDEvent)
{
 CCTALK_BILLEVENTS evts;
 int evtctr;
 CString posstr;

 UpdateData(1);
 m_Result = m_pCcVal->Poll(&evtctr, evts);

 if (evtctr > 0)
 {
  if (evts[evtctr - 1].Status == CCBPOLL_BILL)
  {
   switch (evts[evtctr - 1].Position)
   {
    case CCBILLPOS_ESCROW:
     posstr = "Escrow";
     break;
    case CCBILLPOS_STACKED:
     posstr = "Stacked";
     break;
    default:
     posstr = "Unknown";
     break;
   }
   m_LastBill.Format("Bill: %0.2f %s - %s",
    m_bills[evts[evtctr - 1].BillIndex].Value,
    m_bills[evts[evtctr - 1].BillIndex].Currency,
    posstr);
  }
  else
  {
   m_LastBill.Format("Status: %d", evts[evtctr - 1].Status);
  }
 }

 CDialog::OnTimer(nIDEvent);
 UpdateData(0);
}

void ccDLL_BillValidator::OnBnClickedBtnreset()
{
 UpdateData(1);
 m_Result = m_pCcVal->Reset();
 UpdateData(0);
}

// Get bill status
void ccDLL_BillValidator::OnBnClickedBtnread()
{
 UpdateData(1);
 for (int i = 0; i < MAX_BILLS; i++)
 {
  *m_values[i] = "";
  *m_currencies[i] = "";
  *m_enables[i] = false;
 }
 if ((m_Result = m_pCcVal->GetBillStatus(m_bills)) == CCERR_OK)
 {
  for (int i = 0; i < MAX_BILLS; i++)
  {
   m_values[i]->Format("%0.2f", m_bills[i].Value);
   *m_currencies[i] = m_bills[i].Currency;
   *m_enables[i] = m_bills[i].Enable;
  }
 }
 UpdateData(0);
}

// Set bill enable
void ccDLL_BillValidator::OnBnClickedBtnset()
{
 UpdateData(1);
 for (int i = 0; i < MAX_BILLS; i++) m_bills[i].Enable = *m_enables[i];
 m_Result = m_pCcVal->SetBillEnable(m_bills);
 UpdateData(0);
}

// Get and set master inhibit
void ccDLL_BillValidator::OnBnClickedBtninhibit()
{
 UpdateData(1);
 m_Result = m_pCcVal->GetMasterInhibit(&m_MasterInhibit);
 UpdateData(0);
}

void ccDLL_BillValidator::OnBnClickedBtninhibit2()
{
 UpdateData(1);
 m_Result = m_pCcVal->SetMasterInhibit(m_MasterInhibit); 
 UpdateData(0);
}

// Get and set escrow enable
void ccDLL_BillValidator::OnBnClickedBtnescrow2()
{
 UpdateData(1);
 m_Result = m_pCcVal->GetEscrowEnable(&m_EscrowEnable);
 UpdateData(0);
}

void ccDLL_BillValidator::OnBnClickedBtnescrow()
{
 UpdateData(1);
 m_Result = m_pCcVal->SetEscrowEnable(m_EscrowEnable);
 UpdateData(0);
}

void ccDLL_BillValidator::OnBnClickedBtnroutebill()
{
 UpdateData(1);
 switch (m_cbxBillRoute.GetCurSel())
 {
  case 0:
   m_Result = m_pCcVal->RouteBill(CCBROUTE_RETURN);
   break;
  case 1:
   m_Result = m_pCcVal->RouteBill(CCBROUTE_STACK);
   break;
  case 2:
   m_Result = m_pCcVal->RouteBill(CCBROUTE_EXTEND);
   break;
 }
 UpdateData(0);
}

// Change PIN code
void ccDLL_BillValidator::OnBnClickedBtnchangepin()
{
 LPTSTR pinbff = m_PIN.GetBuffer(0);
 if (m_PIN.GetLength() == 6)
  for (int i = 0; i < 6; i++) m_pin[i] = pinbff[i] - '0';
 else
  for (int i = 0; i < 6; i++) m_pin[i] = 0;
 m_pCcVal->ChangePINCode(m_pin);
}

*ccDLL_BillValidator.h

#pragma once
#include ".\ccTalkComm.h"
#include "afxwin.h"
 

// ccDLL_BillValidator-Dialogfeld

class ccDLL_BillValidator : public CDialog
{
 DECLARE_DYNAMIC(ccDLL_BillValidator)

public:
 ccDLL_BillValidator(CWnd* pParent = NULL);   // Standardkonstruktor
 virtual ~ccDLL_BillValidator();

 // ccTalk Device
 CBillValidator* m_pCcVal;

private:
 CString* m_values[16];
 CString* m_currencies[16];
 BOOL* m_enables[16];
 CCTALK_BILLS m_bills;
 UINT_PTR m_tmrid;
 BYTE m_pin[6];


// Dialogfelddaten

 enum IDD { IDD_BILLVALIDATOR };

protected:
 virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterstützung

 DECLARE_MESSAGE_MAP()
public:
 CString m_Val00;
 CString m_Val01;
 CString m_Val02;
 CString m_Val03;
 CString m_Val04;
 CString m_Val05;
 CString m_Val06;
 CString m_Val07;
 CString m_Val08;
 CString m_Val09;
 CString m_Val10;
 CString m_Val11;
 CString m_Val12;
 CString m_Val14;
 CString m_Val15;
 CString m_Val13;
 afx_msg void OnBnClickedBtnread();
 afx_msg void OnBnClickedCancel();
 CString m_Curr00;
 CString m_Curr01;
 CString m_Curr02;
 CString m_Curr03;
 CString m_Curr04;
 CString m_Curr05;
 CString m_Curr06;
 CString m_Curr07;
 CString m_Curr08;
 CString m_Curr09;
 CString m_Curr10;
 CString m_Curr11;
 CString m_Curr12;
 CString m_Curr13;
 CString m_Curr14;
 CString m_Curr15;
 BOOL m_Enab00;
 BOOL m_Enab01;
 BOOL m_Enab02;
 BOOL m_Enab03;
 BOOL m_Enab04;
 BOOL m_Enab05;
 BOOL m_Enab06;
 BOOL m_Enab07;
 BOOL m_Enab08;
 BOOL m_Enab09;
 BOOL m_Enab10;
 BOOL m_Enab11;
 BOOL m_Enab12;
 BOOL m_Enab13;
 BOOL m_Enab14;
 BOOL m_Enab15;
 CString m_LastBill;
 BOOL m_DoPoll;
 BOOL m_MasterInhibit;
 BOOL m_EscrowEnable;
 afx_msg void OnBnClickedCheck17();
 afx_msg void OnClose();
 afx_msg void OnTimer(UINT_PTR nIDEvent);
 afx_msg void OnBnClickedBtnreset();
 CComboBox m_cbxBillRoute;
 afx_msg void OnBnClickedBtnset();
 afx_msg void OnBnClickedBtninhibit();
 afx_msg void OnBnClickedBtninhibit2();
 afx_msg void OnBnClickedBtnescrow2();
 afx_msg void OnBnClickedBtnescrow();
 afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
 afx_msg void OnBnClickedBtnroutebill();
 int m_Result;
 CString m_PIN;
 afx_msg void OnBnClickedBtnchangepin();
};



*ccDLL_CoinSelector.cpp

#include "stdafx.h"
#include "ccDLL_Test.h"
#include "ccDLL_CoinSelector.h"

 

// ccDLL_CoinSelector-Dialogfeld


IMPLEMENT_DYNAMIC(ccDLL_CoinSelector, CDialog)

ccDLL_CoinSelector::ccDLL_CoinSelector(CWnd* pParent /*=NULL*/)
: CDialog(ccDLL_CoinSelector::IDD_COINSELECTOR, pParent)
 , m_Val00(_T(""))
 , m_Val01(_T(""))
 , m_Val02(_T(""))
 , m_Val03(_T(""))
 , m_Val04(_T(""))
 , m_Val05(_T(""))
 , m_Val06(_T(""))
 , m_Val07(_T(""))
 , m_Val08(_T(""))
 , m_Val09(_T(""))
 , m_Val10(_T(""))
 , m_Val11(_T(""))
 , m_Val12(_T(""))
 , m_Val14(_T(""))
 , m_Val15(_T(""))
 , m_Curr00(_T(""))
 , m_Curr01(_T(""))
 , m_Curr02(_T(""))
 , m_Curr03(_T(""))
 , m_Curr04(_T(""))
 , m_Curr05(_T(""))
 , m_Curr06(_T(""))
 , m_Curr07(_T(""))
 , m_Curr08(_T(""))
 , m_Curr09(_T(""))
 , m_Curr10(_T(""))
 , m_Curr11(_T(""))
 , m_Curr12(_T(""))
 , m_Curr13(_T(""))
 , m_Curr14(_T(""))
 , m_Curr15(_T(""))
 , m_Enab00(FALSE)
 , m_Enab01(FALSE)
 , m_Enab02(FALSE)
 , m_Enab03(FALSE)
 , m_Enab04(FALSE)
 , m_Enab05(FALSE)
 , m_Enab06(FALSE)
 , m_Enab07(FALSE)
 , m_Enab08(FALSE)
 , m_Enab09(FALSE)
 , m_Enab10(FALSE)
 , m_Enab12(FALSE)
 , m_Enab13(FALSE)
 , m_Enab14(FALSE)
 , m_Enab15(FALSE)
 , m_Enab11(FALSE)
 , m_DoPoll(FALSE)
 , m_LastCoin(_T(""))
{
 m_values[ 0] = &m_Val00;
 m_values[ 1] = &m_Val01;
 m_values[ 2] = &m_Val02;
 m_values[ 3] = &m_Val03;
 m_values[ 4] = &m_Val04;
 m_values[ 5] = &m_Val05;
 m_values[ 6] = &m_Val06;
 m_values[ 7] = &m_Val07;
 m_values[ 8] = &m_Val08;
 m_values[ 9] = &m_Val09;
 m_values[10] = &m_Val10;
 m_values[11] = &m_Val11;
 m_values[12] = &m_Val12;
 m_values[13] = &m_Val13;
 m_values[14] = &m_Val14;
 m_values[15] = &m_Val15;
 m_currencies[ 0] = &m_Curr00;
 m_currencies[ 1] = &m_Curr01;
 m_currencies[ 2] = &m_Curr02;
 m_currencies[ 3] = &m_Curr03;
 m_currencies[ 4] = &m_Curr04;
 m_currencies[ 5] = &m_Curr05;
 m_currencies[ 6] = &m_Curr06;
 m_currencies[ 7] = &m_Curr07;
 m_currencies[ 8] = &m_Curr08;
 m_currencies[ 9] = &m_Curr09;
 m_currencies[10] = &m_Curr10;
 m_currencies[11] = &m_Curr11;
 m_currencies[12] = &m_Curr12;
 m_currencies[13] = &m_Curr13;
 m_currencies[14] = &m_Curr14;
 m_currencies[15] = &m_Curr15;
 m_enables[ 0] = &m_Enab00;
 m_enables[ 1] = &m_Enab01;
 m_enables[ 2] = &m_Enab02;
 m_enables[ 3] = &m_Enab03;
 m_enables[ 4] = &m_Enab04;
 m_enables[ 5] = &m_Enab05;
 m_enables[ 6] = &m_Enab06;
 m_enables[ 7] = &m_Enab07;
 m_enables[ 8] = &m_Enab08;
 m_enables[ 9] = &m_Enab09;
 m_enables[10] = &m_Enab10;
 m_enables[11] = &m_Enab11;
 m_enables[12] = &m_Enab12;
 m_enables[13] = &m_Enab13;
 m_enables[14] = &m_Enab14;
 m_enables[15] = &m_Enab15;

 m_tmrid = 0;
}

ccDLL_CoinSelector::~ccDLL_CoinSelector()
{
}

void ccDLL_CoinSelector::OnClose()
{
 if (m_tmrid != NULL)
 {
  int res = KillTimer(m_tmrid);
  if (res) m_tmrid = NULL;
 }

 CDialog::OnClose();
}

void ccDLL_CoinSelector::DoDataExchange(CDataExchange* pDX)
{
 CDialog::DoDataExchange(pDX);
 DDX_Text(pDX, IDC_EDIT1, m_Val00);
 DDX_Text(pDX, IDC_EDIT11, m_Val01);
 DDX_Text(pDX, IDC_EDIT13, m_Val02);
 DDX_Text(pDX, IDC_EDIT15, m_Val03);
 DDX_Text(pDX, IDC_EDIT17, m_Val04);
 DDX_Text(pDX, IDC_EDIT19, m_Val05);
 DDX_Text(pDX, IDC_EDIT21, m_Val06);
 DDX_Text(pDX, IDC_EDIT23, m_Val07);
 DDX_Text(pDX, IDC_EDIT25, m_Val08);
 DDX_Text(pDX, IDC_EDIT27, m_Val09);
 DDX_Text(pDX, IDC_EDIT29, m_Val10);
 DDX_Text(pDX, IDC_EDIT31, m_Val11);
 DDX_Text(pDX, IDC_EDIT33, m_Val12);
 DDX_Text(pDX, IDC_EDIT37, m_Val14);
 DDX_Text(pDX, IDC_EDIT39, m_Val15);
 DDX_Control(pDX, IDC_BTNREAD, m_btnRead);
 DDX_Control(pDX, IDC_BTNSET, m_btnSet);
 DDX_Text(pDX, IDC_EDIT10, m_Curr00);
 DDX_Text(pDX, IDC_EDIT12, m_Curr01);
 DDX_Text(pDX, IDC_EDIT14, m_Curr02);
 DDX_Text(pDX, IDC_EDIT16, m_Curr03);
 DDX_Text(pDX, IDC_EDIT18, m_Curr04);
 DDX_Text(pDX, IDC_EDIT20, m_Curr05);
 DDX_Text(pDX, IDC_EDIT22, m_Curr06);
 DDX_Text(pDX, IDC_EDIT24, m_Curr07);
 DDX_Text(pDX, IDC_EDIT26, m_Curr08);
 DDX_Text(pDX, IDC_EDIT28, m_Curr09);
 DDX_Text(pDX, IDC_EDIT30, m_Curr10);
 DDX_Text(pDX, IDC_EDIT32, m_Curr11);
 DDX_Text(pDX, IDC_EDIT34, m_Curr12);
 DDX_Text(pDX, IDC_EDIT36, m_Curr13);
 DDX_Text(pDX, IDC_EDIT38, m_Curr14);
 DDX_Text(pDX, IDC_EDIT40, m_Curr15);
 DDX_Check(pDX, IDC_CHECK1, m_Enab00);
 DDX_Check(pDX, IDC_CHECK2, m_Enab01);
 DDX_Check(pDX, IDC_CHECK3, m_Enab02);
 DDX_Check(pDX, IDC_CHECK4, m_Enab03);
 DDX_Check(pDX, IDC_CHECK5, m_Enab04);
 DDX_Check(pDX, IDC_CHECK6, m_Enab05);
 DDX_Check(pDX, IDC_CHECK7, m_Enab06);
 DDX_Check(pDX, IDC_CHECK8, m_Enab07);
 DDX_Check(pDX, IDC_CHECK9, m_Enab08);
 DDX_Check(pDX, IDC_CHECK10, m_Enab09);
 DDX_Check(pDX, IDC_CHECK11, m_Enab10);
 DDX_Check(pDX, IDC_CHECK13, m_Enab12);
 DDX_Check(pDX, IDC_CHECK14, m_Enab13);
 DDX_Check(pDX, IDC_CHECK15, m_Enab14);
 DDX_Check(pDX, IDC_CHECK16, m_Enab15);
 DDX_Check(pDX, IDC_CHECK12, m_Enab11);
 DDX_Check(pDX, IDC_CHECK17, m_DoPoll);
 DDX_Text(pDX, IDC_EDIT41, m_LastCoin);
}


BEGIN_MESSAGE_MAP(ccDLL_CoinSelector, CDialog)
 ON_BN_CLICKED(IDCANCEL, ccDLL_CoinSelector::OnBnClickedCancel)
 ON_BN_CLICKED(IDC_BTNREAD, ccDLL_CoinSelector::OnBnClickedBtnread)
 ON_BN_CLICKED(IDC_BTNSET, ccDLL_CoinSelector::OnBnClickedBtnset)
 ON_BN_CLICKED(IDC_CHECK17, ccDLL_CoinSelector::OnBnClickedCheck17)
 ON_WM_TIMER()
 ON_BN_CLICKED(IDC_BTNRESET, ccDLL_CoinSelector::OnBnClickedBtnreset)
 ON_WM_CLOSE()
END_MESSAGE_MAP()


// ccDLL_CoinSelector-Meldungshandler

void ccDLL_CoinSelector::OnBnClickedCancel()
{
 OnCancel();
}

 

void ccDLL_CoinSelector::OnBnClickedBtnread()
{
 m_pCcSel->GetCoinStatus(m_coins);
 for (int i = 0; i < MAX_COINS; i++)
 {
  m_values[i]->Format("%0.2f", m_coins[i].Value);
  *m_currencies[i] = m_coins[i].Currency;
  *m_enables[i] = m_coins[i].Enable;
 }
 UpdateData(0);
}

void ccDLL_CoinSelector::OnBnClickedBtnset()
{
 UpdateData(1);
 for (int i = 0; i < MAX_COINS; i++)
 {
  m_coins[i].Enable = *m_enables[i];
 }
 m_pCcSel->SetCoinEnable(m_coins);
}


void ccDLL_CoinSelector::OnBnClickedBtnreset()
{
 m_pCcSel->Reset();
}

void ccDLL_CoinSelector::OnBnClickedCheck17()
{
 if (m_tmrid != NULL)
 {
  int res = KillTimer(m_tmrid);
  if (res) m_tmrid = NULL;
 }
 UpdateData(1);
 if (m_DoPoll)
 {
  m_tmrid = SetTimer(1, 200, NULL);
 }
}

void ccDLL_CoinSelector::OnTimer(UINT_PTR nIDEvent)
{
 CCTALK_COINEVENTS evts;
 int evtctr;

 m_pCcSel->Poll(&evtctr, evts);

 if (evtctr > 0)
 {
  if (evts[evtctr - 1].Status == CCCPOLL_COIN)
  {
   m_LastCoin.Format("Coin: %0.2f %s (%d)",
    m_coins[evts[evtctr - 1].CoinIndex].Value,
    m_coins[evts[evtctr - 1].CoinIndex].Currency,
    evts[evtctr - 1].Path);
  }
  else
  {
   m_LastCoin.Format("Status: %d", evts[evtctr - 1].Status);
  }
  UpdateData(0);
 }
 
 CDialog::OnTimer(nIDEvent);
}

*ccDLL_CoinSelector.h

#pragma once
#include ".\ccTalkComm.h"
#include "afxwin.h"

// ccDLL_CoinSelector-Dialogfeld


class ccDLL_CoinSelector : public CDialog
{
 DECLARE_DYNAMIC(ccDLL_CoinSelector)

public:
 ccDLL_CoinSelector(CWnd* pParent = NULL);   // Standardkonstruktor
 virtual ~ccDLL_CoinSelector();

 // ccTalk Device
 CCoinSelector* m_pCcSel;

// Dialogfelddaten
 enum  IDD{ IDD_COINSELECTOR };
 //typedef ccDLL_CoinSelector::IDD ccDLL_CoinSelector_IDD;

protected:

 virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV-Unterstützung

 DECLARE_MESSAGE_MAP()
public:
 afx_msg void OnBnClickedCancel();
 CString m_Val00;
 CString m_Val01;
 CString m_Val02;
 CString m_Val03;
 CString m_Val04;
 CString m_Val05;
 CString m_Val06;
 CString m_Val07;
 CString m_Val08;
 CString m_Val09;
 CString m_Val10;
 CString m_Val11;
 CString m_Val12;
 CString m_Val13;
 CString m_Val14;
 CString m_Val15;
 CButton m_btnRead;
 CButton m_btnSet;
 afx_msg void OnBnClickedBtnread();

private:
 CString* m_values[16];
 CString* m_currencies[16];
 BOOL* m_enables[16];
 CCTALK_COINS m_coins;
 UINT_PTR m_tmrid;
public:
 CString m_Curr00;
 CString m_Curr01;
 CString m_Curr02;
 CString m_Curr03;
 CString m_Curr04;
 CString m_Curr05;
 CString m_Curr06;
 CString m_Curr07;
 CString m_Curr08;
 CString m_Curr09;
 CString m_Curr10;
 CString m_Curr11;
 CString m_Curr12;
 CString m_Curr13;
 CString m_Curr14;
 CString m_Curr15;
 BOOL m_Enab00;
 BOOL m_Enab01;
 BOOL m_Enab02;
 BOOL m_Enab03;
 BOOL m_Enab04;
 BOOL m_Enab05;
 BOOL m_Enab06;
 BOOL m_Enab07;
 BOOL m_Enab08;
 BOOL m_Enab09;
 BOOL m_Enab10;
 BOOL m_Enab12;
 BOOL m_Enab13;
 BOOL m_Enab14;
 BOOL m_Enab15;
 BOOL m_Enab11;
 afx_msg void OnBnClickedBtnset();
 BOOL m_DoPoll;
 CString m_LastCoin;
 afx_msg void OnBnClickedCheck17();
 afx_msg void OnTimer(UINT_PTR nIDEvent);
 afx_msg void OnBnClickedBtnreset();
 afx_msg void OnClose();
};



s'il vous plait vous pouvez m'aider à resoudre ce probleme et m'expliquez c'est due a quoi ce type de problème
et merci d'avance.




mercredi 20 août 2008 à 17:46:45 | Re : erreur LNK

juju12

Déjà, "Error executing link.exe." ça veut pas dire qu'il a réussi à compiler, au contraire, link.exe est appelé au cours de la compilation, en l'occurence elle n'est pas réussie du tout.

Quant à tes erreurs... habituellement c'est qu'il manque un ou plusieurs .lib
associés je suppose à ton ccTalkCom.h
il faut que tu les lies au projet en mettant ceci dans un fichier .cpp, peu importe lequel:
#pragma comment (lib,"nom_de_la_lib.lib")

Et pour la première erreur, as-tu déjà lié un lib au projet? Parce que dans ce cas faudra que tu utilises la même version du Runtime que ce que tu inclues :
Menu Project->Properties->Config->C/C++->Code Generation->Runtime Library
et attention à le changer pour les modes Debug ET Release.



Cette discussion est classée dans : pdx, idc, cstring, ddx, ccdll


Répondre à ce message

Sujets en rapport avec ce message

erreur de linkage [ par olfa7183 ] bonjour,j'ai un projet prgramme avec visual studio C++ 6.0lors de compilation tout est bien mais à l'exécution j'obtient des erreurs de linkage.je veu pb initialisation/modification de variables ds une boite de dialogue [ par neub ] Salut,j'ai un leger ennui qui devrait etre certainement simple à resoudre (je suis debutant en vc++):je developpe un module de trajectographie. Ds mon property page avec les activex OCX [ par stef2000 ] je souhaite integrer une combo box dans ma property page. Je souhaite l'iniatialiser avec une liste de valeurs possible pour une propriété via OnInit DDX_Check int to int & [ par shootrz ] Bonjour j'essai de faire un DDX_Check et j'obtien toujour l'erreur error C2664: 'DDX_Check' : cannot convert parameter 3 from 'int' to 'int &'[CODE] Jeu de Taquin [ par 2fear ] Bonjour,Je dois programmer un jeu de taquin (3x3) sur Visual Studio 2005 ... et j'ai vraiment besoin d'aide !J'ai commencé par créer une boite de dial pb conversion CString string pour affichage ds combobox [ par phenix6942 ] bonjour à tousje realise un projet mfc dans lequel j utilise plusieurs boites de dialogue.dans une de ces boites je souhaite afficher des string dans EDITBOX [ par sarah62223 ] Salut,Je suis débutant pour les mfc et j'ai besoin d'un conseil.j'ai un edit ou il y a une phrase d'une centaine de caractere mais j'aimerais voir tou conversion d'un long en CString [ par ykavok ] bonjour.si quelqu'un pouvait m'aider ca serai vraiment super sympas .... ca fais deux jours que je me prend la tete pour convertir un long en cstring. ! Aide pour bouton radio (débutant) [ par etaxi ] Salut à tous; voilà je suis en train de m'initier aux différents controls j'ai pompé un code sur les boutons radio, ça fonctionne; mais je voudrais lu !code OK ?rien ne s'affiche !je m'arrache les tiffs [ par etaxi ] Je salut tout le monde tout de même. voilà, j'ai trois fichiers: un.c un.h un.rc le projet se compile sans erreurs. ce n'est pas une usine à gaz d'app


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,515 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales