|
Hello,
I have downloaded the last version of log4cpp from source forge but I have to build the sources because they dont provide the binaries. There's a MSVC6 folder in the distrib (the project is not maintained for a long time) but I only have visual studio .net 2003. Is it possible to build this project with vs2003?
In fact I even tried to buid it under vc++ 6 but I also have build errors.
I would also like to have your advices about the best logging api for c++ or simply about the logging apis you are using.
Thx.
|
|
|
|
|
|
It tells that some files are corrupted or missing. You can download the bundle and launch a build to see what happens.
|
|
|
|
|
Or you could be explicit and paste some of the errors in this thread.
It seems quite unreasonable to ask someone to download and build these files just to assist you.
Help us help you. If you make helping you too much work, you will not get help.
|
|
|
|
|
Ok, I'm sorry but when I wrote this message I was at home and I couldn't paste you the errors because I don't have vs.NET on my computer. By the way, downloading the api and launching a build took me less than 1mn that's why I whished you could do this to see the errors by yourself. Ok, sorry again and here's the build output:
------ Build started: Project: log4cpp, Configuration: Debug Win32 ------
Performing Custom Build Step
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
Build log was saved at "file://c:\Donwloaded Tools\c++\log4cpp-0.3.3\msvc6\log4cpp\Debug\BuildLog.htm"
log4cpp - 1 error(s), 0 warning(s)
|
|
|
|
|
my best guess is that you are missing header files from vc++ 6. try to search for each missing .h file online and download it and put it in your include path or project path.
and i agree, it's alot to ask people to download distros to help you
|
|
|
|
|
Am I misled in thinking that you can do basic logic operations in the preprocessor?
Here's what I'm trying to do: I have a defined constant that I want to check the value of. If that constant value is not what is expected, then I want the compiler to fail.
The purpose is to support previous versions of a program. So when the variable
const long CURRENT_FILE_VERSION = 0x00010005;<br />
changes, the compile fails and the programmer is reminded to update that section of code to convert older file versions to the current format. This is what I've tried:
#define VERSION_TEST 0x00010005 //supported version<br />
#if CURRENT_FILE_VERSION > VERSION_TEST<br />
File version has changed, please add support for the old version here <br />
#endif
Is there any way to do something like this?
Thanks
-- modified at 14:09 Thursday 12th January, 2006
|
|
|
|
|
the preprocessor doesn't know much of anything about C/C++ - it doesn't understand C/C++ variable declaration or assignment.
try something like this:
#define _CURRENT_FILE_VERSION 0x00010005
#define VERSION_TEST 0x00010005
#if (_CURRENT_FILE_VERSION > VERSION_TEST)
#error File version has changed, please add support for the old version here
#endif
const long CURRENT_FILE_VERSION = _CURRENT_FILE_VERSION;
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks, that did the trick. So it looks like preprocessor logic is possible, as long as you use defined constants, not variables.
|
|
|
|
|
Hello all,
I am fairly new to Visual C++ and MFC.
I have learnt the basics.
I would like to write a text editor based on CRichEdit if possible or CEdit.
As I would prefer not to reinevnt the wheel, I would like to start from a basic notepad-like application and modify it.
Does anyone know where I can find the source code of a basic editor?
I have browsed a bit but only found the code for Write on the Microsoft website which does not work on my machine.
Many thanks.
Giulio
|
|
|
|
|
Use the wizard to generate an SDI app and in the options, change the CView class to CEditView or CRichEditView.
Regards,
Nish
|
|
|
|
|
Giulio2000 wrote: As I would prefer not to reinevnt the wheel, I would like to start from a basic notepad-like application and modify it.
GOOGLE[^] is your friend buddy
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello
I want to write a driver that will:
1. Catch certain packets (UDP and TCP) that been sent by my host.
2. Add to their data additional information.
3. Change accordingly the checksum.
4. Resend the packets.
The driver should be windows based, and in kernel mode of course.
My questions are:
1. Do I need to write a filter hook driver?
2. Can anyone help me in starting to write this kind of driver (never written a driver)?
3. I read about IPsec driver, and I think its doing something similar. Does this information help me? In addition, if it does, how can I get its source, or maybe a related source of a driver doing similar operations.
Thank you
|
|
|
|
|
you can never just add some information to a udp or tcp packet. They all have a size limit, which is normally given by the network hardware. This will cause many packets to be oversized, so they have to be split... it's more complicated than you might think to do such a thing.
Don't try it, just do it!
|
|
|
|
|
I am trying to debug a program that captures live video from my webcam. As soon as I try to initialize the filter group, a message box pop ups displaying "Protection error -debugger detected please close it down and restart". I think that some dll (maybe the webcam drivers?) has some kind of protection against reverse engineering. How can I know what is the dll causing this?
Thanks.
--
Miguel A. Vilariño
Software Developer
|
|
|
|
|
You could run a disassembler on them and see if they link to IsDebuggerPresent . That is an API your program can call at runtime to see if it is being debugged.
|
|
|
|
|
|
I ran into some linker warnings about multiply defined symbols in a very large application (20 VC projects). I tracked it down to someone defining a function within the header file. I personally think it's lazy coding but that's just my opinion and we all know what those are....
<br />
#pragma once<br />
class Foo<br />
{<br />
public:<br />
Foo();<br />
virtual ~Foo();<br />
<br />
int GetBar() const { return m_value; };<br />
<br />
private:<br />
int m_value;<br />
};<br />
The header file is used across multiple static library projects. Each static library exports the symbol Foo::GetBar. The application project then links in all the static libraries spitting the warnings LNK4006. Does anyone have a technical explanation why the #pragma once doesn't prohibit this type of error and/or why each static library exports Foo::GetBar? Thanks.
harrier
-- modified at 12:12 Thursday 12th January, 2006
|
|
|
|
|
#pragma once only causes the header to be included a single time per compilation unit. Each source file is a separate compilation unit. A static library is a collection of one or more compilation units.
Each static library contains Foo::GetBar because each one included the header file to get the definition of Foo.
If you did not think GetBar would ever be overloaded by a dervied class, I would just tag that sucker as inline and get it over with.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Blake Miller wrote: Marriage slows down your coding
maybe...
Blake Miller wrote: a baby slows it down even more!
...but it's so sweet that it shouldn't even be compared to...
when you don't give time to you compiler, it will stay as is.
if you don't give time to your baby, he will grow up with a missing father !
make your choice.
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
|
Blake Miller wrote: If you did not think GetBar would ever be overloaded by a dervied class, I would just tag that sucker as inline and get it over with.
thats interesting - I wouldnt have thought of that if it had been me - I would have ripped the function implementation out into its own cpp
the things you learn by sitting back and watching sometimes
cheers, Garth
|
|
|
|
|
implementing the function in the class itself are called inline functions.
-Prakash
|
|
|
|
|
thanks Mr P. I knew that (what inline was) - I didnt know that making it inline would get around that particular 'multiple define' issue
'g'
|
|
|
|
|
#pragma once just causes the compiler to process an include file only once per build... that has nothing to do with the linker.
Don't try it, just do it!
|
|
|
|