Sorry … forgot to add. Changing it to: // Internal use only //struct BondSM class BondSM { public: BondSM(bond::Bond *b_) : b(b_) {} void Connected(); void SisterDied(); void Death(); void Heartbeat(); void StartDying(); private: bond::Bond *b; }; didn't seem to cause any issues … it compiled fine. On May 5, 2012, at 3:42 PM, Kevin Walchko wrote: > > > I get the following compile warnings … looking at bond.h it does declare BondSM as a struct at the bottom and a friend class also, but then BondSM_sm.h now calls it a class. This all seems odd. > > Shouldn't the declaration in bond.h be a class? > > // Internal use only > struct BondSM << change to class?? > { > BondSM(bond::Bond *b_) : b(b_) {} > void Connected(); > void SisterDied(); > void Death(); > void Heartbeat(); > void StartDying(); > > private: > bond::Bond *b; > }; > > ----------------------------------- > Error snippet: > > Scanning dependencies of target rospack_genmsg_libexe > [ 0%] Built target rospack_genmsg_libexe > Scanning dependencies of target rosbuild_precompile > [ 0%] Built target rosbuild_precompile > Scanning dependencies of target bondcpp > [ 33%] Building CXX object CMakeFiles/bondcpp.dir/src/timeout.o > [ 66%] Building CXX object CMakeFiles/bondcpp.dir/src/bond.o > In file included from /Users/kevin/ros_sandbox/stacks/bond_core/bondcpp/src/bond.cpp:32: > /Users/kevin/ros_sandbox/stacks/bond_core/bondcpp/include/bondcpp/bond.h:186:1: warning: > 'BondSM' defined as a struct here but previously declared as a class > [-Wmismatched-tags] > struct BondSM > ^ > /Users/kevin/ros_sandbox/stacks/bond_core/bondcpp/include/BondSM_sm.h:25:1: note: > did you mean struct here? > class BondSM; > ^~~~~ > struct > 1 warning generated. > [100%] Building CXX object CMakeFiles/bondcpp.dir/src/BondSM_sm.o > In file included from /Users/kevin/ros_sandbox/stacks/bond_core/bondcpp/src/BondSM_sm.cpp:8: > /Users/kevin/ros_sandbox/stacks/bond_core/bondcpp/include/bondcpp/bond.h:186:1: warning: > 'BondSM' defined as a struct here but previously declared as a class > [-Wmismatched-tags] > struct BondSM > ^ > /Users/kevin/ros_sandbox/stacks/bond_core/bondcpp/include/BondSM_sm.h:25:1: note: > did you mean struct here? > class BondSM; > ^~~~~ > struct > 1 warning generated. > Linking CXX shared library ../lib/libbondcpp.dylib > clang: warning: argument unused during compilation: '-pthread' > [100%] Built target bondcpp