[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn 1.0.6 lib dev issues on win32

From: Ed Curren <ecurren_at_adelphia.net>
Date: 2004-08-17 01:47:06 CEST

Hello all,

            I'm using the subversion 1.0.6 library for Windows (i.e.
svn-win32-1.0.6_dev.zip) with Visual Studio 6.0 SP5. I created a console
application and included all of the lib files in the project (i.e. all the
files under the "lib" directory as well as those lib files under the apr,
apriconv, apr-util, and neon directories). In addition to these I included
rpcrt4.lib, shfolder.lib, and ws2_32.lib as these libraries appear to be
dependencies of the svn library. I basically copied the svnadmin main.c
file into my project and attempted to compile it, with the following
modification to the main function:

 

int main(int argc, char* argv[])

{

            struct apr_allocator_t *allocator;

            struct apr_getopt_t *getopt;

            struct svnadmin_opt_state *opt_state;

            struct apr_pool_t *pool;

 

            if (apr_allocator_create (&allocator)) return EXIT_FAILURE;

            apr_allocator_max_free_set (allocator,
SVN_ALLOCATOR_RECOMMENDED_MAX_FREE);

 

            struct svn_error_t *svn_error = subcommand_create(getopt,
opt_state, pool);

            

            return 0;

}

 

When I have only "return 0;" in the main function the project compiles with
no errors or warnings. When I compile the code with the main function above
I get the following errors:

 

Compiling...

Test.cpp

C:\SourceCode\Sandbox\SubversionApi\Test.cpp(49) : warning C4042: 'open_fn'
: has bad storage class

C:\SourceCode\Sandbox\SubversionApi\Test.cpp(799) : warning C4700: local
variable 'pool' used without having been initialized

C:\SourceCode\Sandbox\SubversionApi\Test.cpp(799) : warning C4700: local
variable 'opt_state' used without having been initialized

C:\SourceCode\Sandbox\SubversionApi\Test.cpp(799) : warning C4700: local
variable 'getopt' used without having been initialized

Linking...

Test.obj : error LNK2001: unresolved external symbol
__imp__apr_allocator_max_free_set@8

Debug/Test.exe : fatal error LNK1120: 1 unresolved externals

Error executing link.exe.

 

Test.exe - 2 error(s), 4 warning(s)

 

The warnings are obviously nothing to worry about, but I can't figure out
why I'm getting the unresolved external symbol error. It looks as if it is
defined in apr.lib, and apr.lib is included in my project.

 

Can anyone help with this? I'm quite baffled.

Thanks much.

Ed
Received on Tue Aug 17 01:47:09 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.