#7 Error in Compiling

closed
nobody
None
5
2006-03-15
2006-03-14
Anonymous
No

I am trying to get ast to compile on freebsd 5.4-Rel.
I am using gcc 3.4.2. I know 'getline' is gcc
specific, so should I try to use 3.3 to compile? Any
other ideas?

if g++ -DHAVE_CONFIG_H -I. -I. -I.
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/include -I/usr/include/ta-lib -g -O2
-MT error_page.o -MD -MP -MF ".deps/error_page.Tpo" -c
-o error_page.o error_page.cc; then mv -f
".deps/error_page.Tpo" ".deps/error_page.Po"; else rm
-f ".deps/error_page.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I.
-I/usr/local/include/libxml2 -I/usr/local/include
-I/usr/local/include -I/usr/include/ta-lib -g -O2
-MT pipe.o -MD -MP -MF ".deps/pipe.Tpo" -c -o pipe.o
pipe.cc; then mv -f ".deps/pipe.Tpo" ".deps/pipe.Po";
else rm -f ".deps/pipe.Tpo"; exit 1; fi
pipe.cc: In member function `bool
input_pipe::readln(std::string&)':
pipe.cc:133: error: `getline' undeclared (first use
this function)
pipe.cc:133: error: (Each undeclared identifier is
reported only once for each function it appears in.)

Thanks,

jason c.
jcowlishaw at gmail dot com

Discussion

  • Patched pipe.cc

     
    Attachments
  • Logged In: YES
    user_id=1281708

    Hi Jason,

    The problem is that BSD libc is missing the getline
    function. It is part of glibc. I have created a fix, please
    replace your existing pipe.cc file with the attached file.
    Please let me know if you have any more compile errors
    (you're the first BSD I have!).

    Thanks

    -- Michael.

     
    • status: open --> closed
     
  • Logged In: YES
    user_id=1281708

    Confirmed with author patch fixes problem.