提示:
=====================
命令行      正在创建临时文件“g:\MyDoc\MyApps\Vc\zhuanhuan\Debug\RSP000004.rsp”,其内容为
[
/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_AFXDLL" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Zc:wchar_t /Yu"stdafx.h" /Fp"Debug/zhuanhuan.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP
.\zhuanhuanDlg.cpp
.\zhuanhuan.cpp
]
正在创建命令行“cl.exe @g:\MyDoc\MyApps\Vc\zhuanhuan\Debug\RSP000004.rsp /nologo”
正在创建命令行“rc.exe /d "_DEBUG" /d "_AFXDLL" /l 0x804 /I "Debug" /fo"Debug/zhuanhuan.res" .\zhuanhuan.rc”
正在创建临时文件“g:\MyDoc\MyApps\Vc\zhuanhuan\Debug\RSP000005.rsp”,其内容为
[
/OUT:"Debug/zhuanhuan.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:"Debug/zhuanhuan.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86
.\debug\stdafx.obj
.\debug\zhuanhuan.obj
.\debug\zhuanhuanDlg.obj
.\debug\zhuanhuan.res
]
正在创建命令行“link.exe @g:\MyDoc\MyApps\Vc\zhuanhuan\Debug\RSP000005.rsp” 输出窗口      正在编译...
zhuanhuanDlg.cpp
zhuanhuan.cpp
正在生成代码...
正在编译资源...
正在链接...
zhuanhuan.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall CConvertDlg::CConvertDlg(class CWnd *)" (??0CConvertDlg@@QAE@PAVCWnd@@@Z) ,该符号在函数 "public: virtual int __thiscall CConvertApp::InitInstance(void)" (?InitInstance@CConvertApp@@UAEHXZ) 中被引用
zhuanhuanDlg.obj : error LNK2001: 无法解析的外部符号 "public: void __thiscall CConvertDlg::OnEnChangeEdit(void)" (?OnEnChangeEdit@CConvertDlg@@QAEXXZ)
Debug/zhuanhuan.exe : fatal error LNK1120: 2 个无法解析的外部命令
 结果      生成日志保存在“file://g:\MyDoc\MyApps\Vc\zhuanhuan\Debug\BuildLog.htm”中
zhuanhuan - 3 错误,0 警告 
程序就是简单的一个单位直接的转换啊。

解决方案 »

  1.   

    Visual Studio 2003 编译
      

  2.   

    一个对话框问题找到,前面不知道怎么被我注释掉了,但是新问题出现g:\MyDoc\MyApps\VC\Convert\DConvertDlg.cpp(22) : error C2440: “初始化” : 无法从“const char [1]”转换为“double”一个数据成员是double出错的代码
    CConvertDlg::CConvertDlg(CWnd* pParent /*=NULL*/)
    : CDialog(CConvertDlg::IDD, pParent)
    , m_dbNumber(_T(""))
    , m_result(_T(""))
    {
    m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
    }
      

  3.   

    对话框头文件// ConvertDlg.h : 头文件
    //#pragma once
    #include "afxwin.h"
    // CConvertDlg 对话框
    class CConvertDlg : public CDialog
    {
    // 构造
    public:
    CConvertDlg(CWnd* pParent = NULL); // 标准构造函数// 对话框数据
    enum { IDD = IDD_CONVERT_DIALOG }; protected:
    virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
    // 实现
    protected:
    HICON m_hIcon; // 生成的消息映射函数
    virtual BOOL OnInitDialog();
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    DECLARE_MESSAGE_MAP()
    public:
    // 静态控件
    CStatic m_ref;
    CButton m_length;
    CButton m_weight;
    CButton m_time;
    double m_dbNumber;
    CComboBox m_cbUnit1;
    CListBox m_ItUnit2;
    CString m_result;
    afx_msg void OnBnClickedButtonEqual();
    afx_msg void OnCbnSelchangeCombo1Unit1();
    afx_msg void OnLbnSelchangeList1Unit2();
    afx_msg void OnBnClickedRadioLength();
    afx_msg void OnBnClickedRadioTime();
    afx_msg void OnBnClickedRadioWeight();
    };
    急啊~!急啊~!急啊~!急啊~!急啊~!急啊~!急啊~!急啊~!急啊~!急啊~!
      

  4.   

    【问题解决】是我用VC++自动添加变量时,把m_dbNumber设置成CString了,修改看下面
    CConvertDlg::CConvertDlg(CWnd* pParent /*=NULL*/)
    : CDialog(CConvertDlg::IDD, pParent)
    , m_dbNumber(0)                       //修改了这里
    , m_result(_T(""))
    {
    m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
    }