Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

FIT SDK and XCode

Rank

Total Posts: 3

Joined 2014-01-04

PM

I need some help getting started with the .FIT SDK in XCode. I'm just trying to get the example to run and have 37 linker errors!

Ld /Users/williamluce/Library/Developer/Xcode/DerivedData/FIT_EX-fubkogaivpshyibyvbqwlzwztlla/Build/Products/Debug/FIT_EX normal x86_64
cd /Users/williamluce/Development/FIT/FIT_EX
export MACOSX_DEPLOYMENT_TARGET=10.11
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/williamluce/Library/Developer/Xcode/DerivedData/FIT_EX-fubkogaivpshyibyvbqwlzwztlla/Build/Products/Debug -L/Users/williamluce/Development/FIT/FitSDKRelease_16.50.0/cpp -F/Users/williamluce/Library/Developer/Xcode/DerivedData/FIT_EX-fubkogaivpshyibyvbqwlzwztlla/Build/Products/Debug -filelist /Users/williamluce/Library/Developer/Xcode/DerivedData/FIT_EX-fubkogaivpshyibyvbqwlzwztlla/Build/Intermediates/FIT_EX.build/Debug/FIT_EX.build/Objects-normal/x86_64/FIT_EX.LinkFileList -mmacosx-version-min=10.11 -stdlib=libc++ -Xlinker -dependency_info -Xlinker /Users/williamluce/Library/Developer/Xcode/DerivedData/FIT_EX-fubkogaivpshyibyvbqwlzwztlla/Build/Intermediates/FIT_EX.build/Debug/FIT_EX.build/Objects-normal/x86_64/FIT_EX_dependency_info.dat -o /Users/williamluce/Library/Developer/Xcode/DerivedData/FIT_EX-fubkogaivpshyibyvbqwlzwztlla/Build/Products/Debug/FIT_EX

Undefined symbols for architecture x86_64:
"fit::MesgBroadcaster::AddListener(fit::FileIdMesgListener&)", referenced from:
_main in main.o
"fit::MesgBroadcaster::AddListener(fit::DeviceInfoMesgListener&)", referenced from:
_main in main.o
"fit::MesgBroadcaster::AddListener(fit::MonitoringMesgListener&)", referenced from:
_main in main.o
"fit::MesgBroadcaster::AddListener(fit::UserProfileMesgListener&)", referenced from:
_main in main.o
"fit::MesgBroadcaster::MesgBroadcaster()", referenced from:
_main in main.o
"fit::Mesg::GetFieldByIndex(unsigned short)", referenced from:
Listener::OnMesg(fit::Mesg&) in main.o
.......
"vtable for fit::MesgBroadcaster", referenced from:
fit::MesgBroadcaster::~MesgBroadcaster() in main.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for fit::MesgWithEventBroadcaster", referenced from:
fit::MesgWithEventBroadcaster::~MesgWithEventBroadcaster() in main.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for fit::BufferedRecordMesgBroadcaster", referenced from:
fit::BufferedRecordMesgBroadcaster::~BufferedRecordMesgBroadcaster() in main.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

     
Rank

Total Posts: 20

Joined 2015-05-11

PM

Hello WillLuce,

I cannot reproduce the linker errors you are seeing. Have you made sure to include and compile the .cpp files for the message broadcasters you are using? (i.e, fit_mesg_broadcaster.cpp ).

If you have already done this or it does not fix the issue, feel free to send your project files to me through a private message or attach them in this thread and I will take a look at them.      
Rank

Total Posts: 3

Joined 2014-01-04

PM

Ok. For some reason, the PM option isn't showing up for me on this website. Anyway, here are the steps I've taken.

1. Created a new Xcode project

3. Added all of the .cpp and .hpp files to the
compile sources 


4. Copied all of the code from decode.cpp to the main.cpp in my project

5. Added a TestActivity.fit to my directory and to the arguments of my build scheme

When I run, it compiles. But, when it gives me an "Error opening TestActivity.fit"

It's not letting me attach my project files here.