Menu

Linking problems with msvc6.0

Anonymous
2002-02-14
2002-02-20
  • Anonymous

    Anonymous - 2002-02-14

    Hello everybody,

    I just downloaded the latest stable release of log4cpp (version 0.2.7).

    Then, I did the following...

    1. uncompressed the tar-ball in a newly created dir...ok
    2. loaded the supplied project-file for msvc6.0 (i.e. msvc6/msvc6.0.dsw)...ok
    3. compiled everything...ok
    4. copied log4cppD.lib to one of the directory searched for libraries...ok
    5. created a new project for testing the log4cpp-lib with this file...ok

    </listing>
    #include "log4cpp/Category.hh"
    #include "log4cpp/FileAppender.hh"
    #include "log4cpp/BasicLayout.hh"

    int main(int argc, char* argv[]) {
        log4cpp::Appender* app = new log4cpp::FileAppender("FileAppender", "/logs/testlog4cpp.log");
        return 0;
    } // main
    </listing>

    6. compiled the new project... ok
    7. ling the new projcet.... error

    I also tried to compile and run the test-files coming with the
    tar-balls. Unfortunately, the result remains unchanged: i.e. the source
    can be compiled but not linked.

    As I am new to C++ an msvc6.0 it might be just some silly mistake. On the
    other hand I successfully installed and used the RegEx-lib from boost doing
    approximately the same thing.

    I would very much appreciate any help.

    Thanks in advance.

    Yours sincerely, pac

     
    • Christoph Conrad

      > 7. ling the new projcet.... error

      What error messages did you get exactly?

       
    • Anonymous

      Anonymous - 2002-02-18

      Hello,

      here's the exact error message (in german):

      Linker-Vorgang luft...
      TestLog4Cpp.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: __thiscall log4cpp::FileAppender::FileAppender(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,s
      truct std::char_traits<char>,class std::allocator<char> > const &)" (??0FileAppender@log4cpp@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
      Debug/Lexer.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
      Fehler beim Ausfhren von link.exe.

      Thanks, pac

       
    • Anonymous

      Anonymous - 2002-02-20

      Thanks to everybody for your help.

      The problem is now solved. I had just to change something
      in the settings of msvc. Unfortunately I cannot remember
      what it was.

      Bye, pac

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.