This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

cross compilation error

Note: This was originally posted on 13th January 2013 at http://forums.arm.com

Hi,

I am trying to compile a simple program for testing serial communication. The error received during compilaton is:


/usr/bin/arm-linux-gnueabi-g++-4.7 -c -I/usr/arm-linux-gnueabi/include BaseCommClient.cpp
BaseCommClient.cpp: In member function "˜void Communication::BaseCommClient::ReadThread()':
BaseCommClient.cpp:41:5: error: "˜__arr' was not declared in this scope

It is received during the setup of the 'select' system call:


// set up select call
    fd_set fd_set;
    struct timeval timeout;

FD_ZERO(&fd_set);

Thanks,
David.
Parents
  • Note: This was originally posted on 14th January 2013 at http://forums.arm.com

    David,

    There is a bug/feature/requirement with GCC's FD_ZERO macro implementation that means it is unable to be used in any function where a variable called "fd_set" is defined (yet alone actually trying to pass &fd_set to it); renaming your "fd_set" to something else should avoid this issue.

    hth
    s.
Reply
  • Note: This was originally posted on 14th January 2013 at http://forums.arm.com

    David,

    There is a bug/feature/requirement with GCC's FD_ZERO macro implementation that means it is unable to be used in any function where a variable called "fd_set" is defined (yet alone actually trying to pass &fd_set to it); renaming your "fd_set" to something else should avoid this issue.

    hth
    s.
Children
No data