FreeBSD 7 compilation issues

5 views
Skip to first unread message

Walton Simons

unread,
Nov 18, 2011, 5:28:42 PM11/18/11
to Lightweight Communications and Marshalling
I came across your project and decided to give it a spin, but there
are some problems making it work on FreeBSD.

I cannot compile c++ example or any code that includes lcm-cpp.hpp and
the culprit seems to be fileno method inside LCM class.

On some system fileno is a macro and so compilation will fail.

e.g.


An error message I receive when compiling my project with clang:

/usr/local/include/lcm/lcm-cpp.hpp:102:20: error: expected member name
or ';' after declaration specifiers
inline int fileno();

other compilers also give a similar error;

I attempted to fix this be replacing the method name fileno with
something else and it seems to work. I thought it is something that
can benefit people using FreeBSD systems to know. Are there plans to
address/fix this in the official distribution at some point?

Albert Huang

unread,
Nov 18, 2011, 8:20:31 PM11/18/11
to lcm-...@googlegroups.com
Hi,

Thanks for the report. I've renamed the fileno() method to
getFileno() in svn. That change will be reflected in the next
release.

Albert

> --
> You received this message because you are subscribed to the Google Groups "Lightweight Communications and Marshalling" group.
> To post to this group, send email to lcm-...@googlegroups.com.
> To unsubscribe from this group, send email to lcm-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lcm-users?hl=en.
>
>

Walton Simons

unread,
Nov 21, 2011, 11:51:38 AM11/21/11
to Lightweight Communications and Marshalling
Awesome.
Reply all
Reply to author
Forward
0 new messages