Hi,

Firstly, I'm a novice C++ programmer and this is my 3rd program in total,
my first that involves logging to files.

I'm using Visual Studio 2013 Community and getting lots of errors when I
try to write some simple logging from a DLL that I've written.

I believe I've correctly configured the include directory for log4cxx into
VS2013 as the include's aren't showing up any errors.

However, I'm getting lots of errors from the other code.

Here's the errors:

32 IntelliSense: incomplete type is not allowed
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
86 30 Test
33 IntelliSense: name followed by '::' must be a class or namespace name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
86 44 Test
34 IntelliSense: identifier "properties" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
86 65 Test
35 IntelliSense: expected a ')'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
86 75 Test
36 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
99 48 Test
37 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
100 35 Test
38 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
101 47 Test
39 IntelliSense: incomplete type is not allowed
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
103 30 Test
40 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
103 57 Test
41 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
103 63 Test
42 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
104 17 Test
43 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\config\propertysetter.h
105 9 Test
Error 1 error C1083: Cannot open include file: 'log4cxx/log4cxx.h': No such
file or directory
C:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\logstring.h
28 1 Test
44 IntelliSense: explicit type is missing ('int' assumed)
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
90 21 Test
45 IntelliSense: identifier "File" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
90 32 Test
46 IntelliSense: function "File" is not a type name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
94 21 Test
47 IntelliSense: 'operator=' must be a member function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
94 27 Test
48 IntelliSense: function "File" is not a type name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
94 43 Test
49 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
98 21 Test
50 IntelliSense: declaration is incompatible with "<error-type>
exists(const <error-type> &name)" (declared at line 92 of
"C:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx/spi/loggerrepository.h")
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
105 26 Test
51 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
105 51 Test
52 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
105 57 Test
53 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
105 60 Test
54 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
111 53 Test
55 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
111 59 Test
56 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
111 62 Test
57 IntelliSense: identifier "log4cxx_time_t" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
117 21 Test
58 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
117 67 Test
59 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
117 73 Test
60 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
117 76 Test
61 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
122 21 Test
62 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
122 41 Test
63 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
127 21 Test
64 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
127 41 Test
65 IntelliSense: function "File" is not a type name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
131 21 Test
66 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
131 41 Test
67 IntelliSense: identifier "log4cxx_status_t" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
141 21 Test
68 IntelliSense: identifier "apr_file_t" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
141 43 Test
69 IntelliSense: identifier "file" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
141 56 Test
70 IntelliSense: expected a ')'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
141 60 Test
71 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
142 64 Test
72 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
149 33 Test
73 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
149 67 Test
74 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
149 73 Test
75 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
149 76 Test
76 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
156 55 Test
77 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
156 61 Test
78 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
156 64 Test
79 IntelliSense: function "File" is not a type name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
163 41 Test
80 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
163 71 Test
81 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
163 80 Test
82 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
170 21 Test
83 IntelliSense: declaration is incompatible with "<error-type>
getParent()" (declared at line 666 of
"C:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx/logger.h")
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
170 31 Test
84 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
170 59 Test
85 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
170 65 Test
86 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
170 68 Test
87 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
176 51 Test
88 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
176 57 Test
89 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
176 60 Test
90 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
178 17 Test
91 IntelliSense: declaration is incompatible with "<error-type> getPath()"
(declared at line 127)
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
181 27 Test
92 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
181 53 Test
93 IntelliSense: identifier "p" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
181 59 Test
94 IntelliSense: expected a ';'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
181 62 Test
95 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
182 17 Test
96 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\file.h
183 1 Test
97 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\helpers\appenderattachableimpl.h
58 13 Test
98 IntelliSense: name followed by '::' must be a class or namespace name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\helpers\appenderattachableimpl.h
59 13 Test
99 IntelliSense: name followed by '::' must be a class or namespace name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\helpers\appenderattachableimpl.h
62 13 Test
100 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\helpers\appenderattachableimpl.h
64 27 Test
101 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\helpers\appenderattachableimpl.h
65 31 Test
2 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
87 9 Test
3 IntelliSense: function "close" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
87 30 Test
4 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
94 9 Test
5 IntelliSense: name followed by '::' must be a class or namespace name
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
94 37 Test
6 IntelliSense: namespace "log4cxx::helpers" has no member "Pool"
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
95 33 Test
7 IntelliSense: function "doAppend" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
95 45 Test
8 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
102 9 Test
9 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
102 17 Test
10 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
102 37 Test
11 IntelliSense: function "getName" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
102 43 Test
12 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
108 8 Test
13 IntelliSense: identifier "LayoutPtr" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
108 37 Test
14 IntelliSense: function "setLayout" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
108 56 Test
15 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
113 8 Test
16 IntelliSense: identifier "LayoutPtr" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
113 16 Test
17 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
113 38 Test
18 IntelliSense: function "getLayout" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
113 44 Test
19 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
120 8 Test
20 IntelliSense: identifier "LogString" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
120 35 Test
21 IntelliSense: function "setName" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
120 52 Test
22 IntelliSense: invalid specifier outside a class declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
136 8 Test
23 IntelliSense: a type qualifier is not allowed on a nonmember function
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
136 38 Test
24 IntelliSense: function "requiresLayout" may not be initialized
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
136 44 Test
25 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
137 4 Test
26 IntelliSense: this declaration has no storage class or type specifier
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
139 5 Test
27 IntelliSense: identifier "Appender" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
139 21 Test
28 IntelliSense: this declaration has no storage class or type specifier
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
140 5 Test
29 IntelliSense: identifier "AppenderList" is undefined
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
140 22 Test
30 IntelliSense: expected a ')'
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
140 34 Test
31 IntelliSense: expected a declaration
c:\apache-log4cxx-0.10.0\apache-log4cxx-0.10.0\src\main\include\log4cxx\appender.h
142 1 Test

Here's a code extract

#include <log4cxx/logger.h>
#include <log4cxx/xml/domconfigurator.h>

using namespace log4cxx;
using namespace log4cxx::xml;
using namespace log4cxx::helpers;

LoggerPtr logger(Logger::getLogger("Test"));
DOMConfigurator::configure("TestConfig.xml");

MT4_EXPFUNC double __stdcall Test(const RateInfo* rates, const int
rates_total, const int period, const int shift, const ENUM_APPIED_PRICE
applied_price)
{
    LOG4CXX_DEBUG(logger, "Test NULL array");
    return(0.0);
}

Could someone give me some pointers on how to get this working please as I
don't know where to start.

I know newbies are annoying so my apologies and thanks for your
understanding.

-Andrew
-------
Internet communications are not secure and therefore Andrew Leach does not
accept legal responsibility for the contents of this message.  The
information contained in this email is private, personal and confidential
and may be legally privileged.  It is intended solely for the addressee.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful. This email and any attachments have been
automatically scanned for viruses prior to dispatch, but we make no
warranty that they are free from computer viruses.  You are advised to
check all emails and attachments using your own anti virus software before
opening or executing them.

Reply via email to