>------ Build started: Project: stmp, Configuration: Debug Win32 ------
1>Build started 2010/5/19 18:44:48.
1>InitializeBuildStatus:
1>  Touching "Debug\stmp.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>stmp.def(4): warning LNK4017: LIBRARY statement not supported for the target platform; ignored
1>     Creating library C:\Users\ffg\Documents\Visual Studio 2010\Projects\stmp\Debug\stmp.lib and object C:\Users\ffg\Documents\Visual Studio 2010\Projects\stmp\Debug\stmp.exp
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__gethostname@8 referenced in function "private: void __thiscall SMailer::MailSender::hello(void)" (?hello@MailSender@SMailer@@AAEXXZ)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "private: void __thiscall SMailer::MailSender::quit(void)" (?quit@MailSender@SMailer@@AAEXXZ)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "private: void __thiscall SMailer::MailSender::rcvResponse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?rcvResponse@MailSender@SMailer@@AAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>SMailer.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "private: void __thiscall SMailer::MailSender::sendRequest(enum SMailer::MailSender::Operaion,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?sendRequest@MailSender@SMailer@@AAEXW4Operaion@12@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>C:\Users\ffg\Documents\Visual Studio 2010\Projects\stmp\Debug\stmp.dll : fatal error LNK1120: 8 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.93
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
要怎么办啊

解决方案 »

  1.   

    link error ,是不是某个lib没引用啊,
    #pragma comment(lib,"yours.lib")
    加上看看
      

  2.   

    use32.lib我加了但加yours.lib出现
    LINK : fatal error LNK1104: cannot open file 'yours.lib'
      

  3.   

    关键是:1>stmp.def(4): warning LNK4017: LIBRARY statement not supported for the target platform; ignored
    这一句。把它先搞掉
      

  4.   

    我也遇到过一样的错误,解决方法是:添加连接文件。先到msdn中查一下除了要include   ca_mergex20.h以外还有没有要link的文件,如果有就点击菜单project->setting里的link页在object/library   modules框中添加连接文件名,oleaut32.lib   ole32.lib  把这两个LIB加进去。
    另外不要忘了初始化COM,不然还要报错。
      

  5.   

    搞掉了现在是这样
     Creating library C:\Users\ffg\Documents\Visual Studio 2010\Projects\stmp\Debug\stmp.lib and object C:\Users\ffg\Documents\Visual Studio 2010\Projects\stmp\Debug\stmp.exp
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function "private: void __thiscall SMailer::MailSender::conn(void)" (?conn@MailSender@SMailer@@AAEXXZ)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__gethostname@8 referenced in function "private: void __thiscall SMailer::MailSender::hello(void)" (?hello@MailSender@SMailer@@AAEXXZ)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function "private: void __thiscall SMailer::MailSender::quit(void)" (?quit@MailSender@SMailer@@AAEXXZ)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function "private: void __thiscall SMailer::MailSender::rcvResponse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?rcvResponse@MailSender@SMailer@@AAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
    1>SMailer.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function "private: void __thiscall SMailer::MailSender::sendRequest(enum SMailer::MailSender::Operaion,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?sendRequest@MailSender@SMailer@@AAEXW4Operaion@12@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
    1>stmp.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function "public: __thiscall MUtils::WinSockHelper::WinSockHelper(void)" (??0WinSockHelper@MUtils@@QAE@XZ)
    1>stmp.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function "public: __thiscall MUtils::WinSockHelper::WinSockHelper(void)" (??0WinSockHelper@MUtils@@QAE@XZ)
    1>C:\Users\ffg\Documents\Visual Studio 2010\Projects\stmp\Debug\stmp.dll : fatal error LNK1120: 10 unresolved externals
      

  6.   


    I don't know how to say!
      

  7.   

    #pragma comment(lib,"wpcap.lib")
    #pragma comment(lib,"ws2_32.lib")应该加上与上面类似的东西,我今天遇到了就这样子解决得