Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Failed to load ANT Library (ANT MacOSX Library Package )

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

I tried to ANT MacOSX Library Package on Snow leopard.
But,Failed to load ANT Library.
Does anyone know what's wrong?

My procedure is following.
---------------------------------------------
cd ANT_Library_MacOSX_Package/DEMO_DYLIB
g++ -o demo -I ../ANT_LIB/inc demo.cpp libant.cpp
cp ../BIN/libANT.dylib .
./demo

Then error message "Failed to load ANT Library" appeared.

I tried to copy libANT.dylib to /usr/local/lib and set LD_LIBRARY_PATH.
But,result is the same.      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Have you tried using the XCode Project bundled with the demo? The compiler options to use the dynamic library are already set in this project.

If you want to compile from the command line, you need to specify the path for the library in the linker options, eg.

g++ -o demo -I ../ANT_LIB/inc demo.cpp libant.cpp -L ./ -l ant -arch i386      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Thank you for your comment.

(1)
Yes,I tried Xcode(v3.2.3) first.
DEMO_LIB,ANT_LIB,ANT_DYLIB were complied succesfully.
But, for DEMO_DYLIB,following compiling error appeared

demo.cpp:1: error: expected unqualified-id before 'OTHER' token

I couldn't understand this error.
Then, I tried command line complie.

(2)
By adding the linker options to command line as you say,
I could load ANT library succesfully .Thank you.

(3)
But, one more problem appeared. Like following.
---------------------------------------
bash-3.2$ ./demo
ANT Library Version ALU2.301
Device number?
0
Initialization was successful!

M - Print this menu
A - Send Acknowledged message
B - Send Burst message
R - Reset
C - Request Capabilites
V - Request Version
I - Request Channel ID
S - Request Status
D - Toggle Display
Q - Quit

Channel Type? (Master = 0, Slave = 1)
0
Resetting module...
Setting network key...
A
S
D
A
D
S
---------------------------------------
No response.
I guess callback functions(ResponseFunction/ChannelEventFunction) could not be called.
What should I do?      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

(1) That error generally means that the file got corrupted somehow. You can try the following: copy all the contents of demo.cpp into a new file, delete the file included with the project, and replace it with the new file.

(3) You can try 'R' to repeat the reset and start the configuration sequence again. What kind of ANT stick are you using? You might need to modify the baud rate in the demo depending on the part you are using. Were the drivers installed successfully? Drivers are only available for 32 bit systems at this moment, so if your system is 64-bits, you will need to start in 32-bit mode.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

(1)
I tried to copy all the contents of demo.cpp into new file,but the result was same.

Then, I changed comment for demo.cpp like following.
/* .... */ --> //
Then I could complie successfully!



(3)
I tried 'R', but the result was same.

Yes,I'm using AP2, I have already changed baud rate to 57600 in demo.cpp.

Yes,I'm using 32 bit mode.

Yes,I have already installed "CP210x VCP Mac OSX Drivers" from Silab web(https://www.silabs.com/products/interface/usbtouart/Pages/default.aspx)

Any ideas?      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

The drivers on our website (Support > Downloads) for the Mac will currently only work with the ANT USB1 stick (black plastic). Please contact us directly so we can find a solution for your specific development needs.      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

ohyama wrote:
I tried to ANT MacOSX Library Package on Snow leopard.
But,Failed to load ANT Library.
Does anyone know what's wrong?

My procedure is following.
---------------------------------------------
cd ANT_Library_MacOSX_Package/DEMO_DYLIB
g++ -o demo -I ../ANT_LIB/inc demo.cpp libant.cpp
cp ../BIN/libANT.dylib .
./demo

Then error message "Failed to load ANT Library" appeared.

I tried to copy libANT.dylib to /usr/local/lib and set LD_LIBRARY_PATH.
But,result is the same.
     
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

yes support pl      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Please have a look at the Xcode project that comes together with the demo, as the compiler options to use the dynamic library are already set in this project.