Trying to write a test program using libsmbclient.

Ray Van Dolson rayvd at bludgeon.org
Tue May 1 15:03:59 GMT 2001


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() {
	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







More information about the samba-technical mailing list