Menu

#4 /src make error

open
nobody
None
5
2002-12-02
2002-12-02
Anonymous
No

learn_SOURCES = nicole.h dictionary.h vocabulary.h
parser.h matrix.h log.h database.h dbresult.h
responder.h dictionary.cpp vocabulary.cpp parser.cpp
matrix.cpp log.cpp database.cpp dbresult.cpp
responder.cpp learn.cpp
[root@lovelace src]# make
g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c log.cpp
log.cpp: In constructor `Log::Log(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
log.cpp:36: no matching function for call to
`std::basic_ofstream<char, std::char_traits<char>
>::open(__gnu_cxx::__normal_iterator<char*,
std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, const std::_Ios_Openmode&)'
/usr/include/c++/3.2/fstream:453: candidates are: void
std::basic_ofstream<_CharT, _Traits>::open(const
char*, std::_Ios_Openmode = (std::ios_base::out |
std::ios_base::trunc)) [with _CharT = char, _Traits =
std::char_traits<char>]
make: *** [log.o] Error 1
[root@lovelace src]#

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Has anyone come up with a solution or work-a-round to this
    problem yet? It seems to be fairly common.

     
  • Nobody/Anonymous

    Logged In: NO

    I found a simple solution to this problem...

    Since the .cpp file is just a log function, comment out the
    line of code in question in the "Log" constructor.

    I got mine to compile today.

    Kevin Bagnall

     
  • Nobody/Anonymous

    Logged In: NO

    in log.cpp, change line 36 (the one that fails) to:
    logfile.open ( fname.c_str());

     

Log in to post a comment.

MongoDB Logo MongoDB