I'm trying to run the FtpClient (in C) using OpenObex. I'm using NetBeans. Compiling is OK but when linking there are errors:
This is how I link:
gcc -lopenobex -lobexftp -o dist/Debug/GNU-Linux-x86/obextest build/Debug/GNU-Linux-x86/main.o
I have made sure that both .a files are in /usr/lib
And it won't link, errors say stuff about undefined references like this one:
ObexTest/main.c:34: undefined reference to `obexftp_open'
It doesn't show errors about not finding the libraries and obviously I did include :
cli = obexftp_open(OBEX_TRANS_BLUETOOTH, NULL, NULL, NULL);
That's where the linker complains… If I right click on the function and click on "Go to Declaration" it will take me to the Header and show me the function…
I'm kind of new to Linux and GNU C… I appreciate your time, it's just that I've spent some hours trying to figure out and I feel kind of frustrated you know…
Did you try using -L/usr/lib or juststuffing the lib archives in there, e.g. gcc /usr/lib/libobexftp.a -o out main.o
Also see the section '-llibrary' in gcc(1) i.e. man gcc
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.