Trying to write a test program using libsmbclient.

Richard Sharpe sharpe at ns.aus.com
Wed May 2 11:17:32 GMT 2001


At 08:03 AM 5/1/01 -0700, Ray Van Dolson wrote:
>I'm trying to write a test program using libsmbclient and the simplest
>things aren't working quite the way it seems they should.
>
>#include <libsmbclient.h>
>#include <stdio.h>
>
>int main() {

You need to do an smbc_init before hand ... check out the testsmbc program
or the tree.c program (both in the client directory ...)

>	printf("%d\n",smbc_open("smb://TULCATE/Mp3"));
>}
>
>% gcc -o bob test.c -lsmbclient
>% ./bob
>-1
>%
>
>It returns -1 for any URI I throw in there.  These URI's work fine when
>used with smbclient directly, so I think I may be doing something wrong.
>Do I need to call smbc_init() first?
>
>Ray Van Dolson
>
>
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.ethereal.com)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba






More information about the samba-technical mailing list