Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

xcode and ANT MacOSX Library Package with source code

Rank

Total Posts: 4

Joined 0

PM

Hi,
I've use c++ on windows machines, but I'm new to xcode for mac. From what I understand, I should be able to compile and run "ANT MacOSX Library Package with source code" using xcode on a Mac. I can successfully compiled the windows version on a windows machine and run the demo executable. I have used the sample code to create several useful programs, but now I want to be able to run the same programs on my Mac. When I try to build the demo_dylib in xcode, I get an error: "The run destination My Mac is not valid for Running the scheme 'demo_dylib'. " I'm not sure what this is, I did several searches on google and nothing useful really comes up. Does anyone know how to fix this? I'm running OS 10.11.2 and have have xcode 7.2.

Thanks in advance,
Fred      
Rank

Total Posts: 4

Joined 0

PM

Just incase anyone else runs into this, the fix is changing the BaseSDK setting to the OS. In my case OS X 10.11      
Rank

Total Posts: 4

Joined 0

PM

Now that I can compile, I can't connect to any port. It keeps failing to connect to port zero. I only have one usb dongle connected so I assume it is port 0. Any help is appreciated.

Thanks,
     
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Can you try using the generic auto connect device as a test like this:

//Note scratch code has little to no error checking

#define DEBUG_FILE
#include "dsi_ant_device.hpp"
...
DSIANTDevice d;
d.SetDebug(TRUE);
if(!
d.Open())
{
   printf
("Failed Open!");
}
else
{
   AntChan c0
;
   
d.AddMessageProcessor(0, &c0;);
   
c0.pclANT->GetChannelStatus(0NULL300);
   ...



If it is connecting, getChannelStatus should return data. Otherwise look for the log files generated in the running directory and you can zip them and PM me.      

Signature

Dynastream Developer

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Two more things to check:

-There is a known error that should finally get fixed in the next release where the function import for ANT_Init is being misinterpreted as a two parameter function, it in fact has 4 parameters the later 2 being UCHARs that should be defaulted to 0. You can call it ANT_Init(57600, 0,0,0) to fix it. See https://www.thisisant.com/forum/viewreply/6585/

-Make sure you aren't running Garmin Express or another application that is already using the ANT stick
     

Signature

Dynastream Developer