apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damir Dezeljin <program...@nib.si>
Subject Problems compiling APR sources on Windows - PLEASE HELP
Date Thu, 14 Nov 2002 11:53:45 GMT

I'm using MS VS .NET on Windows.

I compiled apr_20021114053927.tar.gz and apr-util_20021114053944.tar.gz
without problems (I compiled 'aprutil' (the static libraries) ). Then I
copied all */*.lib and */include/*.h files (apr, apr-utils and apr-iconv)
into c:\apr\lib and c:\apr\include . I added the c:\apr\include directory
to the end of the list 'Tools->Options->Projects->Include files', then I
added the c:\apr\lib to the end of the list
'Tools->Options->Projects->Library files'.

I created a new project, edit the properties of the project and added:
'apr.lib aprutil.lib apriconv.lib xml.lib' in the 'Linker->Command Line'.

I made a simple program:
#include <stdlib.h>
#include <stdio.h>

#include "apr_lib.h"
#include "apr_general.h"

int main(void) {

    return 0;

Every time I try to compile it, I get error:
Linking ...
test.obj : error LNK2019: unresolved external symbol
  __imp__apr_initialize@0 referenced in function _main
  Debug/test.exe : fatal error LNK1120: 1 unresolved externals

I also try to define APR_DECLARE_STATIC and APU_DECLARE_STATIC symbols in
project properties->C/C++->Command Line (/D "APR_DECLARE_STATIC" /D
"APU_DECLARE_STATIC"), but in this way I only get a lot of new errors (so
the situation is even wrose).

Please can someone help me to compile my simple aplication?


View raw message