logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilfong, Paul" <paul.wilf...@ngc.com>
Subject RE: Getting Started under VS2005
Date Wed, 26 Sep 2007 15:41:13 GMT
Iwan's steps also are good for VS2003, with minor tweaks due to
differences in the two versions.  For example, in VS2003, you get to the
project properties under the Project pull-down menu.


I'd also recommend to have VS automatically copy the dll to your
executable location, by going to the project properties, Build
Events->Post-Build Event, and putting the copy command into the Command
Line field.  (This is for VS2003 - I hope VS2005 is similar).


That way, if you rebuild the log4cxx dll, you don't have to remember to
copy it to the execution location.  I usually forget, and then if I try
to use the debugger in my application to step into the log4cxx code, the
message "There is no source code available for the current location"
pops up.


From: Iwan Tomlow [mailto:iwan.tomlow@seagha.com] 
Sent: Wednesday, September 26, 2007 12:20 AM
To: Log4CXX User
Subject: RE: Getting Started under VS2005

Only thing you need to do is tell the linker your project will be
dependent of the log4cxx-library.
In VS2005, this can be done via Project Properties, go to Configuration
Properties > Linker > Input, en add the log4cxx-library in the
"Additional Dependencies" option.
For debug-build of your project, you will want to add "log4cxxd.lib",
for release-build "log4cxx.lib".
Linker must of course be able to find these files, so either make it a
full path or add the lib-directory to the general search-path via menu
Tools > Options > Projects and Solutions > VC++ Directories.
Select "Library files" as "Show directories for:", and add the path to
your log4cxx-build (something like "C:\log4xx-0.10.0\lib").
You'll probably also want to add "C:\log4cxx-0.10.0\include" or the
likes in the "Include files" search path here.
Finally, just add appropriate includes for log4cxx.h etc. as in the
examples, and make sure the actual log4cxx.dll (or log4cxxd.dll) are
present at the same location as your .exe, or can be located via your
Windows PATH environment.
Hope this helps


From: Johannes.Frank@kisters.de [mailto:Johannes.Frank@kisters.de] 
Sent: woensdag 26 september 2007 8:53
To: Log4CXX User
Subject: RE: Getting Started under VS2005

Thank you for your quick answer. However, this was not what I meant. I
found this post already (bless merc, that is) and managed to compile
log4cxx using his given project file. 
The problem I have now is that I have absolutely no idea on how to
include the compiled dll into my own project because I never worked with
Visual C++ before. 
I tried and clicked around a little (I use C# a lot more often than C++)
but with no result so far. 
If someone could help me out with this problem, I would be happy ;-) 

Johannes Frank 

View raw message