提示出现如下错误。。
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/MyApp.exe : fatal error LNK1120: 3 unresolved externals各位请指点!!

解决方案 »

  1.   

    project--setting--general MFC设置改为use mfc in a shared dll
    project--setting--link--project options:
    找到 /subsystem:console
    改为 /subsystem:windows
      

  2.   

    Project Settings==>C/C++==>Code Generation==>Use run-time Library==>Multithreaded DLL
      

  3.   

    Project Settings==>C/C++==>Code Generation==>Use run-time Library==>Multithreaded DLLproject--setting--general MFC设置改为use mfc in a shared dll
    project--setting--link--project options:
    找到 /subsystem:console
    改为 /subsystem:windows我试过了
      

  4.   

    <笑一笑>在你专业生涯的不同阶段: - 从高中到首席执行官 -
               你用不同的方法解决这个经典问题,下面看看你属于娜个阶段!
               高中:
                ===================
                   10 PRINT "HELLO WORLD"
                   20 END
                大学一年级:
               ===================
                   program Hello(input, output)
                     begin
                       writeln('Hello World')
                     end.
                大学高年级:
                ===================
                   (defun hello
                     (print
                       (cons 'Hello (list 'World))))
                职业新手:
                ===================
                   #include
                   void main(void)
                   {
                     char *message[] = {"Hello ", "World"};
                     int i;
                     for(i = 0; i < 2; ++i)
                       printf("%s", message[i]);
                     printf("\n");
                   }
                职业老手:
                ===================
                   #include
                   #include
                   class string
                   {
                   private:
                     int size;
                     char *ptr;
                   public:
                     string() : size(0), ptr(new char('\0')) {}
                     string(const string &s) : size(s.size)
                     {
                       ptr = new char[size + 1];
                      strcpy(ptr, s.ptr);
                     }
                     ~string()
                     {
                       delete [] ptr;
                     }
                     friend ostream &operator <<(ostream &, const string &);
                     string &operator=(const char *);
                   };
                   ostream &operator<<(ostream &stream, const string &s)
                   {
                     return(stream << s.ptr);
                   }
                   string &string::operator=(const char *chrs)
                   {
                     if (this != &chrs)
                     {
                       delete [] ptr;
                      size = strlen(chrs);
                       ptr = new char[size + 1];
                       strcpy(ptr, chrs);
                     }
                     return(*this);
                   }
                   int main()
                   {
                     string str;
                     str = "Hello World";
                     cout << str << endl;
                     return(0);
                   }
                老练之电脑骇客:
                =======================
                   #include
                   #define S "Hello, World\n"
                   main(){exit(printf(S) == strlen(S) ? 0 : 1);}
                骇客高手:
                =======================
                   % cc -o a.out ~/src/misc/hw/hw.c
                   % a.out
                骇客祖师:
                ===================
                   % cat
                   Hello, world.
                   ^D
                新任经理:
                ===================
                   10 PRINT "HELLO WORLD"
                   20 END
               中级经理:
               ===================
                   mail -s "Hello, world." bob@b12
                   Bob, could you please write me a program that prints "Hello,
                world."?
                   I need it by tomorrow.
                              ( Bob,请帮我写一个打印 "Hello World" 的程式,好吗
    ?我明天要。)
                   ^D
                高级经理:
                ===================
                   % zmail jim
                   I need a "Hello, world." program by this afternoon.
                 ( 我今天下午需要一个打印 "Hello World" 的程式。)
                首席执行官:
                ===================
                   % letter
                   letter: Command not found.
                   % mail
                   To: ^X ^F ^C
                   % help mail
                   help: Command not found.
                   % damn!
                   !: Event unrecognized
                   % logout