Hi Thomas,

Sorry, I could not reply earlier.
Great that you found and posted the solution, already.

let me know if you encounter more issues..
robin


On May 5, 6:57 pm, thomas <[email protected]> wrote:
> Sorry that I didn't mention that I was referring to the C-library of
> oauth [1], which btw could be included on the list at [2]. But back to
> the problem, just in case anybody happens to experience the same.
> I made a beginner's mistake (well, but then again C++ has so many
> quirks that I can live with that): Since liboauth is a C-library, the C
> ++ compiler needs to now that what follows now is C-code, once it
> attempts to link the respective parts.
>
> Hence, one has to tell the C++ compiler already at the time of
> inclusion of the library definition, that what follows is C-code by
> writing:
>
> extern "C" {
>  #include <oauth.h>
>
> }
>
> instead of just #include <oauth.h>.
>
> Here goes another few wasted hours... :(
>
> But thanks for providing that list and of-course, OAuth,
> Thomas
>
> [1]http://liboauth.sourceforge.net/
> [2]http://oauth.net/code
>
> On May 5, 4:37 pm, thomas <[email protected]> wrote:
>
> > Dear list,
>
> > I wanted to ask if any of you have already experienced the following
> > problem: Configuring and make OAuth works fine and liboauth.so and
> > liboauth.la are smoothly installed e.g. in /usr/local/lib but the
> > compiler just won't link to it's methods, like in the following
> > example:
>
> > tzang...@tzangerl-desktop:~$ g++ `pkg-config --libs oauth` test.cpp
> > /tmp/ccR4RD4H.o: In function `main':
> > test.cpp:(.text+0x1e9): undefined reference to `oauth_sign_url(char
> > const*, char**, OAuthMethod, char const*, char const*, char const*,
> > char const*)'
>
> > where pkg-config returns the following:
>
> > tzang...@tzangerl-desktop:~$ pkg-config --libs oauth
> > -Wl,-Bsymbolic-functions -L/usr/local/lib -loauth -lm -lssl -lcurl
>
> > The libraries are all there:
>
> > tzang...@tzangerl-desktop:~$ ls -l /usr/local/lib/liboauth*
> > -rwxr-xr-x 1 root root 73574 2009-05-05 15:57 /usr/local/lib/
> > liboauth.a
> > -rwxr-xr-x 1 root root  1075 2009-05-05 15:57 /usr/local/lib/
> > liboauth.la
> > lrwxrwxrwx 1 root root    17 2009-05-05 15:57 /usr/local/lib/
> > liboauth.so -> liboauth.so.1.0.0
> > lrwxrwxrwx 1 root root    17 2009-05-05 15:57 /usr/local/lib/
> > liboauth.so.1 -> liboauth.so.1.0.0
> > -rwxr-xr-x 1 root root 67232 2009-05-05 15:57 /usr/local/lib/
> > liboauth.so.1.0.0
>
> > and the oauth_sign_url symbol is in the library:
>
> > nm /usr/local/lib/liboauth.so
> > ...
> > 00002ed0 T oauth_sign_url
> > ...
>
> > There aren't any libraries missing either, as ldd indicates. So maybe
> > I am just stumbling over an idiotic error here, which I fail to see
> > with my tunnel perspective or something is very strange. May anybody
> > have a hint or a pointer for me concerning what I might be missing
> > (wrong libtool version or any other compile-time-specific thing
> > maybe?)?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to