Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT source code compile

Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

Hey guys,


I'm having problem compiling some of the source file provided for OS X

The code causing the problem is :

BOOL USBDeviceHandleIOKit::CanOpenDevice(const USBDeviceIOKit*const & pclDevice_)
{
   
if(pclDevice_ == FALSE)
      return 
FALSE;

   return 
USBDeviceHandleIOKit::TryOpen(*pclDevice_);



Error :
/software/USB/device_handles/usb_device_handle_si_iokit.cpp:172: error: comparison between pointer and integer ('const USBDeviceIOKit *' and 'int')
if(pclDevice_ == FALSE)

Trying to compile with C++11 on OS X 10.9.
Thanks in advance!

[Edit]
Fixed if I don't use C++11, but maybe the code could be reviewed for later wink
For the moment, I'll use the .dylib!
Thanks!


     

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com

Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Thanks for letting us know of your solution! smile      
Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

I was able to compile it with C++11 - 64 bits by changing :


if(pclDevice_ == FALSE)
      return 
FALSE


to

if (pclDevice_ == nullptr)
        return 
FALSE


also the pclDevice_ needs to be initialized with nullptr now


Thanks !      

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com

Rank

Total Posts: 13

Joined 2014-08-02

PM

Is this library still under active support / development? I've experienced the very same problems as blaisminator. Issues that come from a very old school C++ style ("false" was introduced back in 1998 into C++).

Looks like there was once a code review with comments in the code that points to a lot of issues. But most of the comments are still there without the review results being applied.      
Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

I would be happy to help and review the code, there is a lot of warning and things that could be updated. So far I just patched theses little thing so it can compile on C++11 64bis. Also a 64 bits .dylib would be nice.

The MacOSX library package code seems to be from April 2004, not sure the source code has been updated though.      

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com