Re: how to get started?
Sam Carleton wrote: Ok, I have apxs installed!! I have created a basic project called fancy_image_handler, when I follow the instructions in the comment of the mod_fancy_image_handler.c, here is what I am getting: D:\Temp\fancy_image_handlerapxs -c -i mod_fancy_image_handler.c cl /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG -IC:\Apache2.2\include /c /Fomod_fancy_image_handler.lo mod_fancy_image_handler.c Looks good link kernel32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:C:/Apache2.2\lib /out:mod_fancy_image_handler.so mod_fancy_image_handler.lo looks bad. There is no libhttpd.lib, libapr-1.lib or libaprutil-1.lib in this link line. (The libpath correctly provided the path to these libraries though.) Odd, can't say offhand what's up, other than this might be an httpd-2.2 specific bug in the apxs. mod_fancy_image_handler.lo : error LNK2001: unresolved external symbol [EMAIL PROTECTED] mod_fancy_image_handler.lo : error LNK2001: unresolved external symbol [EMAIL PROTECTED] These live in libhttpd.lib (.dll).
Re: how to get started?
William A. Rowe, Jr. wrote: Sam Carleton wrote: Ok, I have apxs installed!! I have created a basic project called fancy_image_handler, when I follow the instructions in the comment of the mod_fancy_image_handler.c, here is what I am getting: D:\Temp\fancy_image_handlerapxs -c -i mod_fancy_image_handler.c cl /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG -IC:\Apache2.2\include /c /Fomod_fancy_image_handler.lo mod_fancy_image_handler.c Looks good link kernel32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:C:/Apache2.2\lib /out:mod_fancy_image_handler.so mod_fancy_image_handler.lo looks bad. There is no libhttpd.lib, libapr-1.lib or libaprutil-1.lib in this link line. (The libpath correctly provided the path to these libraries though.) Odd, can't say offhand what's up, other than this might be an httpd-2.2 specific bug in the apxs. I've seen this in httpd-2.2 all over on win32 systems. I thought I'd mentioned it to you and Randy when I mentioned the manifest embedding... Issac
Re: how to get started?
You may need to do apxs -llibhttpd -llibapr-1 -llibaprutil-1 -c ... I've noticed that libs aren't handled properly lately... Sam Carleton wrote: Ok, I have apxs installed!! I have created a basic project called fancy_image_handler, when I follow the instructions in the comment of the mod_fancy_image_handler.c, here is what I am getting: D:\Temp\fancy_image_handlerapxs -c -i mod_fancy_image_handler.c cl /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG -IC:\Apache2.2\include /c /Fomod_fancy_image_handler.lo mod_fancy_image_handler.c mod_fancy_image_handler.c link kernel32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:C:/Apache2.2\lib /out:mod_fancy_image_handler.so mod_fancy_image_handler.lo Creating library mod_fancy_image_handler.lib and object mod_fancy_image_handler.exp mod_fancy_image_handler.lo : error LNK2001: unresolved external symbol [EMAIL PROTECTED] mod_fancy_image_handler.lo : error LNK2001: unresolved external symbol [EMAIL PROTECTED] mod_fancy_image_handler.so : fatal error LNK1120: 2 unresolved externals apxs:Error: Command failed with rc=6291456 . By the way, thanks a million for getting me this far! I really appreciate it! Sam
Re: how to get started?
On Tue, 2007-03-27 at 10:58 -0400, Sam Carleton wrote: On 3/27/07, Ralf Mattes [EMAIL PROTECTED] wrote: On Mon, 2007-03-26 at 22:05 -0400, Sam Carleton wrote: Ok folks, I am developing on Windows. I have VC6, VS2005, and Cygwin installed. I would prefer ot use VS2005, but VC6 will work, Cygwin is a last resort, VERY last resort. I first thought I would try Ralf's advice of running apxs -g -n fancy_image_handler, but I cannot find apxs on my Windows machine. Oh, I'm terribly sorry. I only recalled on my way home that you're running on Windows. Not a problem I got it worked out;) I can't comment at all on Windows development - never done it. Iff you want your module to run on Unix/Linux as well it might be a good idea to install VMWare Player and live images for Linux(Ubuntu), Solaris and NetBSD/OpenBSD. Oh, I have lots of *NIX machines to pick from, I have a OpenBSD machine (my firewall), Solaris 8, and a SuSE Linux, no need for VMWare. Good. Still - the virtual testserver thing really grew on me: I have a clearly defined build/test environment (ever been bitten by a missing library that was never detected because it happend to be installed on you test system?). There are two issues, equally big, in terms of me doing the development on anything other then Windows: 1: The GUI frontend to the system is all 100% Windows right now, even though the web side can stand on it's own, it would be a pain to have to go back to windows all the time to change the data feeding the kiosk. 2: I know the tools in Windows to do C/C++ development, been using them for over a decade now. I have never developed in *NIX, so there is most definitely a learning curve. Definitely. I'd dread to heve to learn Windows API and frameworks. The way I see it, I will make my best effort to keep the module platform neutral. I am thinking about taking the time to learn how to setup the module with, I think it is called, automake, so that I can see if I can get it to compile and run on one of the other platforms I have, but if it takes too much time, I am willing to shelve it for now, it just means there might be more work later to fix the bugs when I take the GUI cross platform. Can anyone point me to some good, quick and easy documentation to setup an automake project? You mean 'automake the BEAST' ? :-) Gosh, _that's_ a real monster. I'd start with the automake book: GNU Autoconf, Automake, and Libtool, by Tromey et al. But beware: utomake is a moving target and has changed since the book was written ... Unless you need some fancy system dependent functionality and you stick to libapr for portability you might just copy/morify the automake setup of an existing module. Cheers, Ralf Mattes Sam
Re: how to get started?
On 3/27/07, Ralf Mattes [EMAIL PROTECTED] wrote: Oh, I have lots of *NIX machines to pick from, I have a OpenBSD machine (my firewall), Solaris 8, and a SuSE Linux, no need for VMWare. Good. Still - the virtual testserver thing really grew on me: I have a clearly defined build/test environment (ever been bitten by a missing library that was never detected because it happend to be installed on you test system?). Too true, too true. I use Microsoft Virtual PC to test installs in Windows. I would like to get VMWare, but I don't have the $$$ for it right now. My main point is that I can, general speaking, test to make sure my code will run and work in the *NIX world, fore I have a lot of it around me. Before I ever where to ship a *NIX version, I will have VMWare and will use it for the final testing. In my first job I wrote and tested the installs, prior to virtual PCs. The *ONLY* safe way to really test a install was to wipe the hard drive and reinstall the OS. Microsoft has some tools to speed the process up, to a degree, but what a pain and a HUGE time sink. Today I have my virgin config in a virtual PC and simply don't apply changes, got to love it!! 2: I know the tools in Windows to do C/C++ development, been using them for over a decade now. I have never developed in *NIX, so there is most definitely a learning curve. Definitely. I'd dread to heve to learn Windows API and frameworks. I am going to have to learn it before this is all done, because it *IS* going cross platform, it will be interesting (if I am still doing development at that point in timegrin). You mean 'automake the BEAST' ? :-) Gosh, _that's_ a real monster. I'd start with the automake book: GNU Autoconf, Automake, and Libtool, by Tromey et al. But beware: utomake is a moving target and has changed since the book was written ... Unless you need some fancy system dependent functionality and you stick to libapr for portability you might just copy/morify the automake setup of an existing module. Good to know, thanks! Sam
Re: how to get started?
1. If your module will ONLY ever be a handler that runs on windows, ISAPI (mod_isapi) might be a better choice. Certainly better than fastcgi for windows-specific apps. (FastCGI is fast because of fork() which windows doesn't support). 2. If you want a windows module, and want to build with apxs, you can. See http://archive.apache.org/dist/perl/win32-bin/apxs_win32-0.3.readme and http://archive.apache.org/dist/perl/win32-bin/apxs_win32-0.3.tar.gz (we are revisiting this behind the scenes right now to make the simplest possible subset a default part of the windows build.) 3. You can always build from a project as well. Simple examples can be found in the httpd sources, such as mod_example.dsp. Building out-of the httpd tree, you'll have to point your project at the includes for httpd and apr (cpp /I flags) and libhttpd.lib (to bind to libhttpd.dll), plus for apache 2.0 - to libapr.lib and libaprutil.dll, or for apache 2.2 point to libapr-1.lib and libaprutil-1.lib. (In Apache 2.2 we adopted the newest APR libraries. The old ones are numbered 0.9.x but there's no -0 suffix to their .lib names. They are NOT compatible.) Manifests suck (VS2005 sucks for a number of reasons, but manifests are chief amongst the reasons.) You will have to bind your VC2005's .dll (call it an .so, call it a .dll, it really doesn't matter) to the emitted .manifest file or it won't have a C Runtime. Honest, VC6 will give you the fewest headaches. Bill Sam Carleton wrote: Ok folks, I am developing on Windows. I have VC6, VS2005, and Cygwin installed. I would prefer ot use VS2005, but VC6 will work, Cygwin is a last resort, VERY last resort. I first thought I would try Ralf's advice of running apxs -g -n fancy_image_handler, but I cannot find apxs on my Windows machine. I then figured, ok well, I will scrap the whole apache module and just do a FastCGI, but I like the idea of using the APR, but darn it to heck, I cannot find ANY documentation on it. I have blown my whole evening mucking around with this and getting NO where, can anyone help me out?