Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

MacOSX 10.8 (Mountain Lion) and ANT SDK

Rank

Total Posts: 1

Joined 0

PM

Has anyone tried or had any luck getting the MacOSX package to compile with Mountain Lion? I've tried using the default Xcode project on my X86_64 MacBook Air and get all sorts of problems. After correcting a bunch of obvious platform setting, I now have issues with #define redefinitions. Any help would be appreciated. Thanks!

The issue has to do with the ULONG typedef defined in inc/types.h, it conflicts with the definition in the MacOS header CFPluginCOM.h

Shane      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The ANT library package for MacOSX v2.9.3 has been released. This version addresses some compatibility issues with Lion, and many improvements on low level serial access to the USB stick. You can find the library here (registration required)
http://www.thisisant.com/pages/ant/ant-software-tools

This version has not been yet tested with Mountain Lion.

Regarding issues with type redefinitions, ULONG in types.h is intended to be an unsigned 32 byte integer. Are you getting this error when compiling the project included in the library package, or when creating your own code?      
Rank

Total Posts: 1

Joined 0

PM

Hi I was able to build it under mountain lion, I did the following change in types.h

#if defined (DSI_TYPES_MACINTOSH)
#include <MacTypes.h>
typedef UInt32 ULONG;
#else
typedef unsigned long ULONG; // Unsigned 4-byte int.
#endif


It will compile, if anyone needs the xcodeproj just asks...

I just not test it yet..


Eduardo      
Rank

Total Posts: 9

Joined 2010-12-08

PM

Hi Eduardo,

I'd like to see what progress you made on getting the project to build on ML. Also, tell me what version of Xcode you were using.

Thanks,

Allan Kobelansky      
Rank

Total Posts: 1

Joined 2013-04-07

PM

Just got it building with Mountain Lion, XCode 4.6.1. Here are the steps I had to take:

types.h:

1) Change:

typedef unsigned long ULONG; // Unsigned 4-byte int.

To:

#if defined (DSI_TYPES_MACINTOSH)
#include <MacTypes.h>
typedef UInt32 ULONG;
#else
typedef unsigned long ULONG; // Unsigned 4-byte int.
#endif

2) Search the project for:

IOCreatePlugInInterfaceForService

Directly above each call, there is a definition of score as "long score". Change long to SInt32 in each case.

3) Highlight the project file (ANT_Libraries, 5 Targets). Highlight the Project on the right side. In the "Build Settings" tab, change "Architectures" to "Standard (32/64 Bit Intel)." Change "Base SDK" to "Latest OS X (Mac OS 10.whatever)." Change "Compiler for C/C++/Objective C" to "Default Compiler."

4) In antfsmessage.h, comment out the error on line 23 and change each "0x__" on line 24 to "0x00" or your network key, whichever you've got.      
Rank

Total Posts: 1

Joined 2014-07-08

PM

Thanks for the post. I was able to get the libraries to compile with the above changes.

Also, accepted Xcode's automated recommended changes to LLVM and others.

I also changed FRAMEWORK_SEARCH_PATHS from $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk to $(DEVELOPER_SDK_DIR)/MacOSX10.9.sdk

Several compiler warnings, but it compiles for now :-)

OS X 10.9.4 and Xcode 5.1.1      
Rank

Total Posts: 1

Joined 2013-12-27

PM

Thanks for the post. It compiled for me with above changes and 15 warnings.

OSX 10.9.5 Xcode 6.2      
Rank

Total Posts: 4

Joined 2015-07-07

PM

I'm trying to build 64bit on 10.10 xcode 6.4 and failing miserably. I get various pointer/integer errors as well as a complete failure to build ANT_LIB/software/USB/iokit_driver/iokit_interface.cpp. These I can cope with. However I get an IOKit error...

ANT_Library_MacOSX_Package/ANT_LIB/software/USB/iokit_driver/iokit_interface.cpp:50:14: error: assigning to 'IOUSBInterfaceInterface300 **' (aka 'IOUSBInterfaceStruct300 **') from incompatible type 'io_object_t' (aka 'unsigned int')
interface = IO_OBJECT_NULL;
^ ~~~~~~~~~~~~~~

This fails in both 32bit and 64bit builds. Any ideas? I'm just trying to use the thing rather than get deep into the nitty gritty of fixing it.

I use Scons rather than XCode for my build system because it is much much less painful on the whole.      
Rank

Total Posts: 4

Joined 2015-07-07

PM

I'm also building with C++11, which seems to be the problem with iokit_interface.cpp

If I turn off C++11 support, it all compiles. I need C++11, this may be a problem.      
Rank

Total Posts: 1

Joined 2013-03-13

PM

I too am trying to get the ANT sample code working on MacOSX (Yosemite), thanks to help in the previous posts in this thread I have got it compiling in Xcode. The demos also runs in Xcode, but when I enter in the deceive number they fails, after some debugging I see when the code tries to open the device it gets an 'ACCESS' error.

Any ideas's?



     
Rank

Total Posts: 5

Joined 2015-08-18

PM

I am trying to run latest released ANT_Library_MacOSX_Package 3 on my Xcode 6.4 OS X 10.10. After all type of build setting as referenced above i am able to successfully build it but its not executing.
When i click on tab Run it shows the message " Build Successful " but after that nothing happening. No console window/output window , Nothing.
Can any one help please.
I just to run this ANT library and want to see the output.

Thanks.