Hello:

I'm getting this with Visual Studio 2003 with different versions of apr
0.9.x, 1.0.0 and the latest stable release. I am using c not c++

jpr.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function [EMAIL PROTECTED]
jpr.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function [EMAIL PROTECTED]
jpr.obj : error LNK2019: unresolved external symbol __imp__apr_terminate
referenced in function [EMAIL PROTECTED]
jpr.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function [EMAIL PROTECTED]
jpr_excep.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function
_jpr_excep_initialize
jpr_excep.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function
_jpr_excep_terminate
jpr_excep.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function
[EMAIL PROTECTED]
jpr_excep.obj : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function
[EMAIL PROTECTED]


It sould be linking for example with [EMAIL PROTECTED] instead of
[EMAIL PROTECTED] at least that is the name the library is
exporting

Do I need to change something in the headers or... maybe define a symbol or
something else?





/* -------------------- This is the fragment of code that calls the macro
apr_pool_create  --------------------------- */

#include <apr_general.h>
#include <apr_pools.h>

#include "jpr_core.h"
#include "jpr_priv.h"

apr_pool_t *_jpr_global_pool = NULL;
static unsigned int _jpr_initialized = 0;
#ifdef WIN32
static int _targc = 0;
static char **_targv = NULL;
#endif

JPR_DECLARE(Jpr_status) jpr_initialize(void)
{
   apr_status_t rv;

   if (_jpr_initialized++) {
       return APR_SUCCESS;
   }

#ifdef WIN32
   if (_targc != __argc)
       _targc = __argc;

   if (_targv != __argv)
       _targv = __argv;

   rv = apr_app_initialize(&_targc, &_targv, NULL);
#else
   rv = apr_initialize();
#endif
   if (APR_SUCCESS == rv) {
       rv = apr_pool_create(&_jpr_global_pool, NULL);
   }

   if (APR_SUCCESS == rv) {
       rv = jpr_excep_initialize();
   }

   if (APR_SUCCESS != rv) {
       _jpr_initialized = 0;
   }

   return rv;
}

/* ------------------------------------------------------------------ */



Thanks in advance for your help
David

Reply via email to