×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

Dear Wendy, here are some hints

本文发表在 rolia.net 枫下论坛1) Seems to me your code is OK, because you have succeeded in compiling. Succeeded in compiling!

2) Your problem occurs at link time, as you have already known.

3) As a VC++ programmer, please be sure to open VC++ studio and investigate all the menu items in it. In particular, you should check the
project properties.

4)Since you said there are no problems with other examples, please compare the project properties, in particular, link libraries,
of the "good" example to those of your 'bad" example.

5) I have ever met such things: I copied some C++ code from Thinking in C++. It went well with Borland Jbuilder4, but crashed my VC++.

6) In any case, you should be persistent in fixing your own problem, no matter how long it will take you. I remember how I studied one piece of toy code----- It did not work in VC. I pined down the issue by putting the code into VC++ part by part and compile the code step by step.

Since few VC++ experts would like to take care of your question, so allow me to exhange my above stupid philosophy with you.

good luck.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / who can help me (VC):link error .I am a beginner on VC.Any one can browse my coding?It's easy for a skilled one I think
    Compiling...
    drawappDoc.cpp
    drawappView.cpp
    Generating Code...
    Linking...
    drawappDoc.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CStroke::GetRuntimeClass(void)const " (?GetRuntimeClass@CStroke@@UBEPAUCRuntimeClass@@XZ)
    drawappView.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass CStroke::classCStroke" (?classCStroke@CStroke@@2UCRuntimeClass@@A)
    drawappView.obj : error LNK2001: unresolved external symbol "public: class CStroke * __thiscall CDrawappDoc::NewStroke(void)" (?NewStroke@CDrawappDoc@@QAEPAVCStroke@@XZ)
    Debug/drawapp.exe : fatal error LNK1120: 3 unresolved externals
    • It seems to me your VC++ installation has been corrupted.
      You cannot find the CRunTimeClass. The simplest cure is to re-install your VC++.
      • but no problem for most samples.Could you browse the coding for me ?it is not very long
        • I suggest you just do it and you will find whether is like jabber had said.It will not take you too more time anyway.isn't it?
        • Dear Wendy, here are some hints
          本文发表在 rolia.net 枫下论坛1) Seems to me your code is OK, because you have succeeded in compiling. Succeeded in compiling!

          2) Your problem occurs at link time, as you have already known.

          3) As a VC++ programmer, please be sure to open VC++ studio and investigate all the menu items in it. In particular, you should check the
          project properties.

          4)Since you said there are no problems with other examples, please compare the project properties, in particular, link libraries,
          of the "good" example to those of your 'bad" example.

          5) I have ever met such things: I copied some C++ code from Thinking in C++. It went well with Borland Jbuilder4, but crashed my VC++.

          6) In any case, you should be persistent in fixing your own problem, no matter how long it will take you. I remember how I studied one piece of toy code----- It did not work in VC. I pined down the issue by putting the code into VC++ part by part and compile the code step by step.

          Since few VC++ experts would like to take care of your question, so allow me to exhange my above stupid philosophy with you.

          good luck.更多精彩文章及讨论,请光临枫下论坛 rolia.net
          • Thank u very much ,u r so helpful
    • Could you provide your project?
      If you like, would you please e-mail your project to ljm@mailexcite.com, I'd like to look what wrong inside your code.

      So far, I believe you should use some MACRO to define some attributes inside the CStroke class.
      you can look at "DECLARE_DYNAMIC" "DECLARE_DYNCREAT" and etc. for answer.