Hello William,
thank you for your quick reply last week.
Unfortunately I still cannot get helloworld-APR.c running under Windows.
William A. Rowe, Jr. wrote:
If you used a -win32-src.zip file, and run nmake against the
makefile.win, you shouldn't be having problems.
I'm not quite sure to understand what you mean by this. Yes, I have
downloaded the win32-src.zip file and followed the instructions in the
section "Developer Studio Workspace/Microsoft Development Environment
IDE Build" on
http://apr.apache.org/compiling_win32.html
to build the libs.
I have also successfully built and run the apr/test/aprtest.dsw project.
If you import into VS2005/2008, there are dependency hassles,
but you can usually work those out by reviewing the build
target and it's dependencies. APR alone is pretty easy.
Sorry, I do not understand what you say here. It might well be that I
just know too little about Windows programming in general. (I come from
a UNIX background.)
Finally, apr.h defines those APR_DECLARE macros to be .dll
imports if you do nothing. You do need to declare -D WIN32
of course.
I have found out by myself that I have to declare this WIN32 macro by
following the compiler's error messages into the apr.h file. You say "of
course": Is this something I should have known beforehand because it is
customary in Windows development? If not so: I cannot read anything
about this in the official documentation!?
Anyway, now my helloworld compiles, but it does not link. I get the
following error messages:
------ Build started: Project: TestAPR, Configuration: Debug Win32 ------
Linking...
try-helloworld-APR.obj : warning LNK4075: ignoring '/EDITANDCONTINUE'
due to '/OPT:ICF' specification
apr-1.lib(start.obj) : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function [EMAIL PROTECTED]
apr-1.lib(start.obj) : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function [EMAIL PROTECTED]
apr-1.lib(apr_snprintf.obj) : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function _conv_in_addr
apr-1.lib(sockaddr.obj) : error LNK2001: unresolved external symbol
[EMAIL PROTECTED]
apr-1.lib(sockaddr.obj) : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function _apr_sockaddr_vars_set
apr-1.lib(sockaddr.obj) : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function _get_local_addr
apr-1.lib(sockaddr.obj) : error LNK2019: unresolved external symbol
[EMAIL PROTECTED] referenced in function _get_local_addr
[...]
Can someone please help me?
Thank you very much,
Joachim