wook815 / google-glog Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/google-glog
License: Other
Automatically exported from code.google.com/p/google-glog
License: Other
What steps will reproduce the problem?
1. Include "logging.h"
2. Don't include "using google::LogMessage" or "using namespace google"
3. Use "LOG_AT_LEVEL(google::INFO)" (or whatever severity)
What is the expected output? What do you see instead?
Get compiler error about LogMessage being undeclared identifier, because it
isn't preceded by google::. (Or even better, ::google::, giving
::google::LogMessage, but that's not such a problem.)
What version of the product are you using? On what operating system?
Glog 0.3.0, Windows (MSVC)
Original issue reported on code.google.com by [email protected]
on 23 Feb 2010 at 2:10
I'm trying to write code that is as compliant as possible. That's why I
always compile with -ansi and -pedantic.
But the attached program won't compile. Since LOG works as expected I'm
rather confused that it does not work with VLOG.
What steps will reproduce the problem?
1. Try compiling the attached program
I used
g++ -ansi -Wno-long-long -pedantic -I<path to glog include> -L<path to glog
lib> -lglog vlog.cc
What is the expected output? What do you see instead?
It should compile it. Bit instead you get the error
vlog.cc:11: error: ISO C++ forbids braced-groups within expressions
from g++.
What version of the product are you using? On what operating system?
I'm using version 0.3.0 on Debian Linux.
$ g++ --version
g++ (Debian 4.3.2-1.1) 4.3.2
As a workaround one can remove -pedantic.
Regards
Original issue reported on code.google.com by [email protected]
on 22 Jan 2010 at 11:05
Attachments:
What steps will reproduce the problem?
1. Include logging.h after windows.h
2. Include logging.h atter UnitTest++.h
What is the expected output? What do you see instead?
I've just started using glog in my project. but there are some problems.
Some definition are conflicting with other header's definition.
For example, ERROR is defined in wingdi.h, CHECK is defined in UnitTest++.
I think the macro names are too general.
What version of the product are you using? On what operating system?
Visual Studio C++ 2005, Win32, UnitTest++
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Apr 2009 at 12:34
It is just a question than an issue.
I am new to glog...
>> I wanted to change Glog configuration for stopping it to send the output
in logfile(The default output file gets generated at:
/tmp/<program name>.<hostname>.<user name>.log.<severity
level>.<date>.<time>.<pid>, i wanted to stop this)
What is the expected output? What do you see instead?
No output INFO or WARNING generated anywhere, it should be nulified.
What version of the product are you using? On what operating system?
glog-0.3.0 on FreeBSD
Please suggest the way, how can i achieve the above?
Original issue reported on code.google.com by [email protected]
on 10 May 2010 at 8:59
With a configuration for a universal binary :
./configure -q --disable-dependency-tracking --enable-static
--enable-shared --prefix=/tmp/glog --with-threads 'LDFLAGS=-isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -arch ppc '
'CFLAGS= -g0 -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch
x86_64 -arch ppc ' 'CXXFLAGS= -g0 -isysroot /Developer/SDKs/MacOSX10.6.sdk
-arch i386 -arch x86_64 -arch ppc '
make fails:
...
g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -DNDEBUG -g0 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -arch ppc -c
src/raw_logging.cc -o libglog_la-raw_logging.o >/dev/null 2>&1
src/logging.cc: In function ‘int google::posix_strerror_r(int, char*,
size_t)’:
src/logging.cc:1758: error: cast from ‘char*’ to ‘int’ loses precision
...
guilty line of code :
buf[0] = '\000';
#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
>>>>>>>> if (reinterpret_cast<int>(rc) < sys_nerr) { <<<<<<<<<
// This means an error on MacOSX or FreeBSD.
return -1;
}
#endif
strncat(buf, rc, len-1);
I suspect that the problem emerges on a 64bit build for Mac OS X, modifying
the 'reinterpret_cast<int>(rc)' to 'reinterpret_cast<long int>(rc)' fixes
the build, but i don't think it's a correct way to solve that.
Original issue reported on code.google.com by [email protected]
on 18 Sep 2009 at 6:58
In the code snippet there is a missing of namespace 'google' on L668 and
L669 in logging.h.
This will result in compilition error with -DNDEBUG when use CHECK_XX.
google::Check##name##Impl(GetReferenceableValue(val1), \
GetReferenceableValue(val2), \
should be
google::Check##name##Impl(google::GetReferenceableValue(val1), \
google::GetReferenceableValue(val2), \
-------------------------------------------------------------
// The meaning of "string" might be different between now and
// when this macro gets invoked (e.g., if someone is experimenting
// with other string implementations that get defined after this
// file is included). Save the current meaning now and use it
// in the macro.
typedef std::string _Check_string;
#define CHECK_OP_LOG(name, op, val1, val2, log) \
while (google::_Check_string* _result = \
google::Check##name##Impl( \
google::GetReferenceableValue(val1), \
google::GetReferenceableValue(val2), \
#val1 " " #op " " #val2)) \
log(__FILE__, __LINE__, \
google::CheckOpString(_result)).stream()
#else
// In optimized mode, use CheckOpString to hint to compiler that
// the while condition is unlikely.
#define CHECK_OP_LOG(name, op, val1, val2, log) \
while (google::CheckOpString _result = \
google::Check##name##Impl(GetReferenceableValue(val1), \
GetReferenceableValue(val2), \
#val1 " " #op " " #val2)) \
log(__FILE__, __LINE__, _result).stream()
#endif // STATIC_ANALYSIS, !NDEBUG
-------------------------------------------------------------
Original issue reported on code.google.com by [email protected]
on 10 Feb 2010 at 7:57
A question not a issue:
glog.html says that: "Unless otherwise specified, glog writes to the filename
"/tmp/<program name>.<hostname>.<user name>.log.<severity
level>.<date>.<time>.<pid>" (e.g., ..."
But how to specify it?
Thank you.
Original issue reported on code.google.com by [email protected]
on 8 Jan 2010 at 9:40
What steps will reproduce the problem?
1. cd glog-0.2.1\src
2. cl /Iwindows /D "GOOGLE_GLOG_DLL_DECL=" /Gm /EHsc /RTC1 /MDd /W3 /nologo
/ZI /TP main.cc logging.cc windows\port.cc raw_logging.cc utilities.cc
vlog_is_on.cc
3. run 'run.cmd' (run.cmd and main.cc are attached)
What is the expected output? What do you see instead?
I expect to get a log file in the current directory named similar to this:
main..jago.log.INFO.20090710-004203.5680
where 'jago' is the current Windows user name, but I am getting the log
file named:
main..invalid-user.log.INFO.20090710-004203.5680
What version of the product are you using? On what operating system?
glog-0.2.1
Windows XP SP3
Visual Studio 2008 SP1
Please provide any additional information below.
This patch fixes the problem:
--- utilities.cc 2009-04-10 11:25:14.000000000 +0400
+++ utilities.cc 2009-07-10 00:31:16.402625000 +0400
@@ -281,7 +281,11 @@
}
static void MyUserNameInitializer() {
// TODO(hamaji): Probably this is not portable.
+#if defined(OS_WINDOWS)
+ const char* user = getenv("USERNAME");
+#else
const char* user = getenv("USER");
+#endif
if (user != NULL) {
g_my_user_name = user;
} else {
Original issue reported on code.google.com by [email protected]
on 9 Jul 2009 at 8:47
Attachments:
Package libunwind7-dev has been installed with 'apt-get install' on Debian
testing, but google-glog failed to detect that library.
One possible fix:
--- glog-0.3.0/configure.ac 2009-07-30 12:21:16.000000000 +0000
+++ configure.ac 2010-03-19 18:02:20.000000000 +0000
@@ -34,7 +34,7 @@
# For backtrace with glibc.
AC_CHECK_HEADERS(execinfo.h)
# For backtrace with libunwind.
-AC_CHECK_HEADERS(libunwind.h)
+AC_CHECK_HEADERS(libunwind.h, ac_cv_have_libunwind_h=1,
ac_cv_have_libunwind_h=0)
AC_CHECK_HEADERS(ucontext.h)
AC_CHECK_HEADERS(sys/utsname.h)
AC_CHECK_HEADERS(pwd.h)
Original issue reported on code.google.com by [email protected]
on 19 Mar 2010 at 6:14
Hi,
the documentation seems to be outdated.
It says:
"If the Google gflags library isn't installed, you set flags via
environment variables, prefixing the flag name with "GLOG_", e.g.
GLOG_logtostderr=1 ./your_application
"
This does not work for me. I have to use the prefix "GOOGLE_" for making it
work. But I like "GLOG_" better since there might be other google libraries
involved.
Further but I can't say for sure yet: it seems that specifying via command
line flags does not work as specified in the documentation.
Regards
Original issue reported on code.google.com by [email protected]
on 15 Oct 2009 at 9:29
What steps will reproduce the problem?
1. #include <windows.h>
2. #include <glog/logging.h>
What is the expected output? What do you see instead?
This generates:
error C2059: syntax error : 'constant'
error C2065: 'NUM_SEVERITIES' : undeclared identifier
whereas it would have been expected to compile cleanly.
What version of the product are you using? On what operating system?
glog-0.3.0, Visual Studio 2005, Windows Vista 64 bit.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2010 at 2:04
What steps will reproduce the problem?
1. Compile glog without changes in libmv with CMake and no special flags.
What is the expected output? What do you see instead?
It doesn't compile. Here are some of the errors:
{{{
/home/keir/wrk/libmv2/src/third_party/glog/src/glog/raw_logging.h:179:
error: declaration ‘struct tm’ does not declare anything
compilation terminated due to -Wfatal-errors.
cc1plus: warnings being treated as errors
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler.cc: In
function ‘void google::<unnamed>::InvokeDefaultSignalHandler(int)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler.cc:235: error:
missing initializer for member ‘sigaction::__sigaction_handler’
compilation terminated due to -Wfatal-errors.
In file included from
/home/keir/wrk/libmv2/src/third_party/glog/src/utilities.h:69,
from
/home/keir/wrk/libmv2/src/third_party/glog/src/googletest.h:38,
from
/home/keir/wrk/libmv2/src/third_party/glog/src/demangle_unittest.cc:39:
/home/keir/wrk/libmv2/src/third_party/glog/src/base/mutex.h:75:1: error:
"_XOPEN_SOURCE" redefined
In file included from /usr/include/c++/4.3/i486-linux-gnu/bits/os_defines.h:44,
from /usr/include/c++/4.3/i486-linux-gnu/bits/c++config.h:40,
from /usr/include/c++/4.3/iostream:44,
from
/home/keir/wrk/libmv2/src/third_party/glog/src/demangle_unittest.cc:34:
In file included from
/home/keir/wrk/libmv2/src/third_party/glog/src/demangle_unittest.cc:39:
/home/keir/wrk/libmv2/src/third_party/glog/src/googletest.h: In function
‘std::string google::Munge(const std::string&)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/googletest.h:442: error:
format ‘%p’ expects type ‘void*’, but argument 3 has type ‘int’
compilation terminated due to -Wfatal-errors.
cc1plus: warnings being treated as errors
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler_unittest.cc:
In function ‘void* DieInThread(void*)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/signalhandler_unittest.cc:51:
error:
control reaches end of non-void function
compilation terminated due to -Wfatal-errors.
make[2]: ***
[third_party/glog/src/CMakeFiles/signalhandler_unittest.dir/signalhandler_unitte
st.o]
Error 1
make[1]: ***
[third_party/glog/src/CMakeFiles/signalhandler_unittest.dir/all] Error 2
make: *** [all] Error 2
/home/keir/wrk/libmv2/src/third_party/glog/src/symbolize_unittest.cc: In
function ‘const char* SymbolizeStackConsumption(void*, int*)’:
/home/keir/wrk/libmv2/src/third_party/glog/src/symbolize_unittest.cc:196:
error: missing initializer for member ‘sigaltstack::ss_sp’
compilation terminated due to -Wfatal-errors.
make[2]: ***
[third_party/glog/src/CMakeFiles/symbolize_unittest.dir/symbolize_unittest.o]
Error 1
}}}
What version of the product are you using? On what operating system?
0.2.1, on Ubuntu 9.04
Please provide any additional information below.
We use glog for libmv, but include it directly in third_party. I have
attached a patch that fixes most of these issues. The only one where I am
not sure what the right fix is for the struct tm.
If you apply this patch, then the diff between libmv's glog and upstream
can shrink. Thanks!
Original issue reported on code.google.com by [email protected]
on 5 Jul 2009 at 10:50
Attachments:
What steps will reproduce the problem?
1. Create sample program using glog and the 'SYSLOG' macro
2. Run Valgrind on the resulting binary.
What is the expected output? What do you see instead?
expected: FILE DESCRIPTORS: 3 open at exit.
current result:
==27112== FILE DESCRIPTORS: 4 open at exit.
==27112== Open AF_UNIX socket 3: <unknown>
==27112== at 0x35EE0DF727: socket (syscall-template.S:82)
==27112== by 0x35EE0DA38B: openlog_internal (syslog.c:355)
==27112== by 0x35EE0DA691: openlog (syslog.c:416)
==27112== by 0x4C4FE27: google::LogMessage::SendToSyslogAndLog()
(logging.cc:1312)
==27112== by 0x4C4EF9E: google::LogMessage::Flush() (logging.cc:1088)
==27112== by 0x4C4F1A8: google::LogMessage::~LogMessage() (logging.cc:1055)
==27112== by 0x400EF5: main (glogtest.cpp:28)
What version of the product are you using? On what operating system?
glog 0.3.0, Fedora 12, x86_64. Glog was built without gflags (too many
valgrind warnings/errors in gflags).
Please provide any additional information below.
I can find the call to openlog in the source, but no call to closelog.
The main problem is that it makes it hard to use valgrind with glog. Would
it be possible to add say ShutdownGoogleLogging in addition to
InitGoogleLogging?
Original issue reported on code.google.com by DGunchev
on 15 Jan 2010 at 1:31
What steps will reproduce the problem?
1. Run a debug build of logging_unittest from within MSVC.
What is the expected output? What do you see instead?
The Output window shows multiple instances of the message
"HEAP[logging_unittest.exe]: Invalid allocation size - 99999998 (exceeded
7ffdefff)".
What version of the product are you using? On what operating system?
v0.2.1 on Windows XP x64
Please provide any additional information below.
I traced these messages back to a call to GetComputerNameA in logging.cc.
According to the MSDN docs the size parameter of this function is used to
determine the size of the buffer which is passed in. However currently the
size is being passed a pointer to an uninitialized DWORD "len". "len" needs
to be initialized to the size of the buffer being passed in, which, also
according to the MSDN docs, only needs to be "MAX_COMPUTERNAME_LENGTH + 1"
characters large.
This also fixes the hostname included in log file names, which otherwise is
always empty.
Original issue reported on code.google.com by [email protected]
on 29 May 2009 at 6:21
What steps will reproduce the problem?
1. win32 platform, vc 2008 express,
2. build with macro UNICODE
3. LOG(INFO)<<L"info"; fails, print a digit number
please check it, thanks
Original issue reported on code.google.com by [email protected]
on 15 Jan 2010 at 8:34
Hi,
I find the Failure Signal Handler quite useful. Because otherwise I would
need to start gdb for getting a stack trace. But why won't it display the
line numbers? Isn't this information in the debugging symbols? Is it
possible to add line information?
Regards,
Jens
Original issue reported on code.google.com by [email protected]
on 15 Oct 2009 at 7:57
Implementation of Rolling File in glog ?
I would like know if with glog we can configure a rolling file.
That is to say , every day glog create a new log file automatically.
Send Log file ?
Can we configure glog to send a log file by email or write in a Data Base
What version of the product are you using? On what operating system?
-glog-0.3.0
-Visual 2005
-XP & Vista
Please provide any additional information below:
I´m trying to compare glog with log4cxx.
It´s for a big project and I have to think about the enhancement of glog
and the support.
Original issue reported on code.google.com by [email protected]
on 20 Nov 2009 at 9:22
logging.h does not have a
#include "config.h"
line
The result is that GOOGLE_GLOG_DLL_DECL is redefined here, so even if the
user changes config.h so it isn't a .dll, some functions & methods are
still exported as if it were a .dll. (Linker warnings result.)
utilities.cc:
#include "stacktrace.h"
#include "symbolize.h"
are included outside the #ifdef HAVE_STACKTRACE
Original issue reported on code.google.com by [email protected]
on 30 Dec 2008 at 2:15
What steps will reproduce the problem?
1. Convert existing VS2008 solution file to VS2003. I used VS project
converter found at "http://sourceforge.net/projects/vspc/files/"
2. Open solution google-glog in VS2003
3. Build the solution or single project
What is the expected output? What do you see instead?
Its expected that it should build without any errors. But errors are thrown
as below
------ Build started: Project: libglog_static, Configuration: Debug Win32
------
Compiling...
vlog_is_on.cc
c:\Tools\glog-0.3.0\src\windows\port.h(133) : error C3861: 'localtime_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\port.h(138) : error C3861: 'strerror_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: ')' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: ')' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: ')'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\vlog_is_on.cc(189) : warning C4002: too many actual
parameters for macro 'RAW_VLOG'
c:\Tools\glog-0.3.0\src\vlog_is_on.cc(189) : warning C4002: too many actual
parameters for macro 'RAW_LOG_INFO'
c:\Tools\glog-0.3.0\src\vlog_is_on.cc(189) : error C2065: '__VA_ARGS__' :
undeclared identifier
utilities.cc
c:\Tools\glog-0.3.0\src\windows\port.h(133) : error C3861: 'localtime_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\port.h(138) : error C3861: 'strerror_s':
identifier not found, even with argument-dependent lookup
raw_logging.cc
c:\Tools\glog-0.3.0\src\windows\port.h(133) : error C3861: 'localtime_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\port.h(138) : error C3861: 'strerror_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: ')' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: ')' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: ')'
: unexpected in macro formal parameter list
port.cc
c:\Tools\glog-0.3.0\src\windows\port.h(133) : error C3861: 'localtime_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\port.h(138) : error C3861: 'strerror_s':
identifier not found, even with argument-dependent lookup
logging.cc
c:\Tools\glog-0.3.0\src\windows\port.h(133) : error C3861: 'localtime_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\port.h(138) : error C3861: 'strerror_s':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(73) : error C2010: ')' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: '.' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(96) : error C2010: ')' :
unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(107) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(114) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(121) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(128) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: '.'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\windows\glog\raw_logging.h(153) : error C2010: ')'
: unexpected in macro formal parameter list
c:\Tools\glog-0.3.0\src\logging.cc(1137) : warning C4002: too many actual
parameters for macro 'RAW_LOG'
c:\Tools\glog-0.3.0\src\logging.cc(1137) : warning C4002: too many actual
parameters for macro 'RAW_LOG_INFO'
c:\Tools\glog-0.3.0\src\logging.cc(1137) : warning C4002: too many actual
parameters for macro 'RAW_LOG_WARNING'
c:\Tools\glog-0.3.0\src\logging.cc(1137) : warning C4002: too many actual
parameters for macro 'RAW_LOG_ERROR'
c:\Tools\glog-0.3.0\src\logging.cc(1137) : warning C4002: too many actual
parameters for macro 'RAW_LOG_FATAL'
c:\Tools\glog-0.3.0\src\logging.cc(1137) : error C2065: '__VA_ARGS__' :
undeclared identifier
c:\Tools\glog-0.3.0\src\logging.cc(1137) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1137) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1137) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1263) : warning C4002: too many actual
parameters for macro 'RAW_LOG'
c:\Tools\glog-0.3.0\src\logging.cc(1263) : warning C4002: too many actual
parameters for macro 'RAW_LOG_INFO'
c:\Tools\glog-0.3.0\src\logging.cc(1263) : warning C4002: too many actual
parameters for macro 'RAW_LOG_WARNING'
c:\Tools\glog-0.3.0\src\logging.cc(1263) : warning C4002: too many actual
parameters for macro 'RAW_LOG_ERROR'
c:\Tools\glog-0.3.0\src\logging.cc(1263) : warning C4002: too many actual
parameters for macro 'RAW_LOG_FATAL'
c:\Tools\glog-0.3.0\src\logging.cc(1263) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1263) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1263) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1263) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1282) : warning C4002: too many actual
parameters for macro 'RAW_LOG'
c:\Tools\glog-0.3.0\src\logging.cc(1282) : warning C4002: too many actual
parameters for macro 'RAW_LOG_INFO'
c:\Tools\glog-0.3.0\src\logging.cc(1282) : warning C4002: too many actual
parameters for macro 'RAW_LOG_WARNING'
c:\Tools\glog-0.3.0\src\logging.cc(1282) : warning C4002: too many actual
parameters for macro 'RAW_LOG_ERROR'
c:\Tools\glog-0.3.0\src\logging.cc(1282) : warning C4002: too many actual
parameters for macro 'RAW_LOG_FATAL'
c:\Tools\glog-0.3.0\src\logging.cc(1282) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1282) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1282) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1282) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1295) : warning C4002: too many actual
parameters for macro 'RAW_LOG'
c:\Tools\glog-0.3.0\src\logging.cc(1295) : warning C4002: too many actual
parameters for macro 'RAW_LOG_INFO'
c:\Tools\glog-0.3.0\src\logging.cc(1295) : warning C4002: too many actual
parameters for macro 'RAW_LOG_WARNING'
c:\Tools\glog-0.3.0\src\logging.cc(1295) : warning C4002: too many actual
parameters for macro 'RAW_LOG_ERROR'
c:\Tools\glog-0.3.0\src\logging.cc(1295) : warning C4002: too many actual
parameters for macro 'RAW_LOG_FATAL'
c:\Tools\glog-0.3.0\src\logging.cc(1295) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1295) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1295) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1295) : error C3861: '__VA_ARGS__':
identifier not found, even with argument-dependent lookup
c:\Tools\glog-0.3.0\src\logging.cc(1346) : warning C4541: 'dynamic_cast'
used on polymorphic type 'std::basic_ostream<_Elem,_Traits>' with /GR-;
unpredictable behavior may result
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
Generating Code...
Build log was saved at
"file://c:\Tools\glog-0.3.0\vsprojects\libglog_static\Debug\BuildLog.htm"
libglog_static - 99 error(s), 23 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
What version of the product are you using? On what operating system?
glog 0.3.0
Visual Studio 2003
Windows Vista
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Oct 2009 at 10:49
What steps will reproduce the problem?
1. google::SendEmail("[email protected]", "this is ia test", "hello");
2.
3.
What is the expected output? What do you see instead?
Results in the following error to stderr: The system cannot find the path
specified
What version of the product are you using? On what operating system?
Microsoft Vista x86
VC++ 9.0
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 4 Apr 2009 at 2:24
What steps will reproduce the problem?
1. ./configure CXXFLAGS="-m32" LDFLAGS="-m32" on x86_64
2. make
What is the expected output? What do you see instead?
expected: Compiled binaries
actual: src/signalhandler.cc: In function ‘void*
google::<unnamed>::GetPC(void*)’:
src/signalhandler.cc:72: error: ‘REG_RIP’ was not declared in this scope
make: *** [libglog_la-signalhandler.lo] Error 1
What version of the product are you using? On what operating system?
trunk
Linux xxxxx 2.6.31-21-generic #59-Ubuntu SMP Wed Mar 24 07:28:27 UTC 2010
x86_64 GNU/Linux
Original issue reported on code.google.com by [email protected]
on 5 May 2010 at 6:07
Attachments:
What steps will reproduce the problem?
Glog uses std::string to hold log directories and file names and open to
create the log. This means that under Windows, file names using unicode
characters cannot be used. So if I wanted to use the directory c:\ސݝש
for instance, I'm out of luck since these characters cannot be represented
using ansi-characters. In order to use Unicode for file names/directories
under Windows, the library would need to use the CreateFile(W)()-call.
This severely limits the usage of glog in internationalized scenarios under
Windows.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2010 at 11:02
What steps will reproduce the problem?
1. Build the projects using the x64 architecture
What is the expected output? What do you see instead?
This generates an error in logging.cc line 1239 because the _asm keyword is
not supported in VS2005 under x64.
In addition there are >10 warnings about conversions from different int types.
What version of the product are you using? On what operating system?
glog-0.3.0, VS2005, Windows Vista 64-bit.
Please provide any additional information below.
The compiler error is not generated by VS2008, but the warnings are still
there.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2010 at 2:19
Is there a way to specify a name of the program component responsible for
the log message? Something like
LOG(INFO, "componentA") << "Everything is great";
If this feature doesn't exist, it would be great to have. Then, if I could
select at run-time which components' messages I want to see (among those
that pass the compile-time GOOGLE_STRIP_LOG parameter), I could spare myself
from a lot of unnecessary output.
Original issue reported on code.google.com by [email protected]
on 22 Nov 2009 at 3:41
What steps will reproduce the problem?
1. Running the project tmvpTest in the attached solution file.
2. Will fail on run, and issue a stack trace.
3. Removing any calls to the glog library will make it work.
What is the expected output? What do you see instead?
I expect that the test file would run and report that all tests have passed
but it cannot load. Removing any calls to glog results in the test running
and passing.
The test project included with the GLOG solution works fine.
What version of the product are you using? On what operating system?
I am running 0.3.0. The project is run from an unmanaged project
(tmvpLib.dll). But there is a managed project (the test project, tmvpTest)
which runs tmvpLib.dll. All in visual studio 8.0.
Please provide any additional information below.
I have only started this project so the code attached is just skeleton code
. Which should make it easy to diagnose since there is very little code. I
am trying setup a test library, code library, and a logging library. The
logging library is giving issue. Here is the stack trace of the error, I
think it is not useful:
Unable to get type tmvpTest.UnitTest1, tmvpTest. Error:
System.IO.FileNotFoundException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile,
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at
Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.GetType(Un
itTestElement unitTest, String type)
at
Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.ResolveMet
hods().
Original issue reported on code.google.com by [email protected]
on 26 Jan 2010 at 3:30
Attachments:
What steps will reproduce the problem?
1. ./configure --host=arm-linux --target=arm-linux
--prefix=/usr/local/arm-linux/
2. make
What is the expected output? What do you see instead?
Expected output: no errors during make
output for glog-0.3.0 :
src/symbolize.cc: In function `ssize_t google::ReadPersistent(int, void*,
unsigned int)':
src/symbolize.cc:124: error: `SSIZE_MAX' undeclared (first use this function)
src/symbolize.cc:124: error: (Each undeclared identifier is reported only once
for each function it appears in.)
make: *** [libglog_la-symbolize.lo] Error 1
What version of the product are you using? On what operating system?
Fedora 11 64 bit
tool-chain arm-linux-g++ 3.2.2
Please provide any additional information below.
As workaround I added this code to symbolize.cc :
#ifndef SSIZE_MAX
#define SSIZE_MAX 0x7fffffff
#endif
Original issue reported on code.google.com by [email protected]
on 30 Oct 2009 at 6:59
Would be a nice feature to add all log messages in the same file
(Optionally). This way we could easily track things in time, in the same file
Original issue reported on code.google.com by leonardoaraujo.santos
on 3 Mar 2010 at 2:52
glog/logging.h:468: warning: unused parameter ‘dummy’
with gcc 4.x.
This is quite annoying, i can't compile without having any warning.
Original issue reported on code.google.com by [email protected]
on 21 Jan 2009 at 11:27
More of a request than an issue:
It'd be really nice if there was wide string support so that:
LOG(INFO) << L"A wide string" << std::endl;
printed out something like:
I0121 135418 main.cpp:30] A wide string
instead of
I0121 135418 main.cpp:30] 0x805edf0
Support for std::wstring would also be very appreciated.
What steps will reproduce the problem?
1. (See above)
2.
3.
What is the expected output? What do you see instead?
(See above)
What version of the product are you using? On what operating system?
glog-0.12 on SuSE 10.3 x86
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 21 Jan 2009 at 9:02
What steps will reproduce the problem?
1. int level = google::INFO; LOG_AT_LEVEL(level) << "Test";
2.
3.
What is the expected output? What do you see instead?
Should compile successfully but received:
error: ‘COMPACT_GOOGLE_LOG_kSeverityToLevel’ was not declared in this scope
What version of the product are you using? On what operating system?
0.3.0, mac & linux
Please provide any additional information below.
Original macro:
#define LOG_AT_LEVEL(severity) LogMessage(__FILE__, __LINE__, severity).stream()
Macro should be:
#define LOG_AT_LEVEL(severity) google::LogMessage(__FILE__, __LINE__,
severity).stream()
This will then be consistent with the other LOGxxx macros.
Original issue reported on code.google.com by [email protected]
on 23 Mar 2010 at 1:42
In my code I need to log inside loops if something bad happens. Since this
logging is executed very often I want to decide at compile time whether I
enable it or not. So that the compiler is able to remove this additional
code. I just had a look at glog and it seems that almost everything is set
up at runtime. This way the logging code is already in the binary. Is there
a way to get rid of this? I'm feeling a bit stupid. So maybe there are
other way's around this since you don't seem to have considered this problem.
The DLOG* statements go in that direction. But let's say I enabled
debugging then all these statements will be in my code despite I want only
ERRORs to be shown.
Regards
Original issue reported on code.google.com by [email protected]
on 6 Oct 2009 at 10:46
glog-0.3.0 failed to build using g++ 4.2 on Mac OS X 10.6.2.
error message:
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -
I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-
sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT libglog_la-
logging.lo -MD -MP -MF .deps/libglog_la-logging.Tpo -c -o libglog_la-
logging.lo `test -f 'src/logging.cc' || echo './'`src/logging.cc g++ -
DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-
virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -
MT libglog_la-logging.lo -MD -MP -MF .deps/libglog_la-logging.Tpo -c
src/logging.cc -fno-common -DPIC -o .libs/libglog_la-logging.o
src/logging.cc: In function ‘int google::posix_strerror_r(int, char*,
size_t)’’:
src/logging.cc:1758: error: cast from ‘char*’ to ‘int’ loses precision
srmake: *** [libglog_la-logging.lo] Error 1
this issue is related to #13 and #34.
quick and dirty fix for this could be:
--- src/logging.cc.orig 2010-02-22 17:40:24.000000000 +0900
+++ src/logging.cc 2010-02-22 17:40:35.000000000 +0900
@@ -1755,7 +1755,7 @@
} else {
buf[0] = '\000';
#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
- if (reinterpret_cast<int>(rc) < sys_nerr) {
+ if (reinterpret_cast<long int>(rc) < sys_nerr) {
// This means an error on MacOSX or FreeBSD.
return -1;
}
Even though it makes compilation successful, link phase still fails.
/bin/sh ./libtool --tag=CXX --mode=link g++ -D_THREAD_SAFE -
I/usr/local/include -Wall -Wwrite-strings -Woverloaded-virtual -Wno-
sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o
logging_unittest logging_unittest-logging_unittest.o libglog.la -
L/usr/local/lib -lgtest -lpthread
g++ -D_THREAD_SAFE -I/usr/local/include -Wall -Wwrite-strings -
Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2
-D_THREAD_SAFE -o .libs/logging_unittest logging_unittest-
logging_unittest.o -Wl,-bind_at_load ./.libs/libglog.dylib -L/usr/local/lib
/usr/local/lib/libgtest.dylib -lpthread
ld: warning: in /usr/local/lib/libgtest.dylib, file was built for i386 which is
not the architecture being linked (x86_64)
Undefined symbols:
"testing::internal::AssertHelper::operator=(testing::Message const&)
const", referenced from:
CheckNOTNULL_Simple_Test::TestBody() in logging_unittest-
logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
LogWithLevels(int, int, bool, bool)in logging_unittest-logging_unittest.o
...
Original issue reported on code.google.com by mootoh
on 22 Feb 2010 at 8:44
Hi,
when building with gtest support on MacOSX, I needed the
following changes to be able to compile from trunk:
Index: Makefile.am
===================================================================
--- Makefile.am (revision 41)
+++ Makefile.am (working copy)
@@ -142,7 +142,7 @@
stl_logging_unittest_SOURCES = $(gloginclude_HEADERS) \
src/stl_logging_unittest.cc
nodist_stl_logging_unittest_SOURCES = $(nodist_gloginclude_HEADERS)
-stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS)
+stl_logging_unittest_CXXFLAGS = $(PTHREAD_CFLAGS) $(TEST_CFLAGS)
stl_logging_unittest_LDFLAGS = $(PTHREAD_CFLAGS)
stl_logging_unittest_LDADD = libglog.la $(COMMON_LIBS)
Index: src/logging_unittest.cc
===================================================================
--- src/logging_unittest.cc (revision 41)
+++ src/logging_unittest.cc (working copy)
@@ -1120,10 +1120,12 @@
base::internal::SetExitOnDFatal(true);
EXPECT_TRUE(base::internal::GetExitOnDFatal());
+#ifdef GTEST_HAS_DEATH_TEST
// Death comes on little cats' feet.
EXPECT_DEBUG_DEATH({
LOG(DFATAL) << "This should be fatal in debug mode";
}, "This should be fatal in debug mode");
+#endif
}
#ifdef HAVE_STACKTRACE
Although I'm not an autotools expert, I suggest removing the
following files from the subversion repository as they're rebuilt
when running 'autoreconf -fvi':
configure Makefile.in depcomp config.guess config.sub
ltmain.sh INSTALL aclocal.m4 install-sh
Best, maw
Original issue reported on code.google.com by [email protected]
on 11 Mar 2009 at 2:00
When i debug a program, I always want to see colorful output to prompt me
what happening. Especially LOG(ERROR) and VLOG.
Surely I can use VLOG like this
【VLOG(0) << "\033[32;49;1m" << msg.DebugString() << " \033[39;49;0m";】
or
【LOG(ERROR) << "\033[31;49;1m ERROR Occurred" << " \033[39;49;0m";】
But this is not convenient. I think glog can debug some macros to support
some standard colorful setting. For example:
【LOG(ERROR) << GLOG_RED << "ERROR Occurred";】
or
【VLOG_RED(0) << "ERROR Occurred";】
【VLOG_GREEN(0) << "ERROR Occurred";】
【VLOG_BLUE(0) << "ERROR Occurred";】
【VLOG_BLUE_BLINK(0) << "ERROR Occurred";】
And restore the color setting after each LOG line output automatically.
Original issue reported on code.google.com by [email protected]
on 24 May 2010 at 3:49
Some users want to compile glog without non-logging features such as
stacktraces or signal handlers. Maybe we can provide a configure option to
disable them.
Original issue reported on code.google.com by [email protected]
on 15 Feb 2010 at 7:17
What steps will reproduce the problem?
1. Compile after R51
2. Note that there are many definitions of mutex now.
What is the expected output? What do you see instead?
glog should not violate the ODR (one definition rule).
What version of the product are you using? On what operating system?
Any after r51
Please provide any additional information below.
r51 puts Mutex into an anonymous namespace. It is generally a bad idea to
put anything in headers into anonymous namespaces, because then each
includer gets a unique definition of whatever was in the anonymous
namespace in the includee. Because of C++ mangling, the linker will see
many different copies, each with a different name, that it will not
coalesce (or at least, we should not rely on them being coalesced).
I suggest changing Mutex to be inside namespace glog or namespace
glog_internal.
Original issue reported on code.google.com by [email protected]
on 8 Jul 2009 at 4:49
Every CHECK macro seems to have an equivalent DCHECK except for CHECK_NOTNULL.
I would submit a patch, but it's just one copy-n-paste in the DCHECK
section of logging.h, so I figured not worth it. If you really want it
though let me know.
Original issue reported on code.google.com by [email protected]
on 11 Dec 2009 at 5:32
What steps will reproduce the problem?
Code:
int main(int argc, char* argv[])
{
google::InitGoogleLogging(argv[0]);
google::SetLogDestination(INFO, "c:\\abc.log");
LOG(INFO) << "ABC";
return 0;
}
What is the expected output? What do you see instead?
Result: 1969/12/31 17:00:00
Should see current date/time. 2009/03/27 01:00:00
What version of the product are you using? On what operating system?
glog rev: r36
Windows Vista x64
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 27 Mar 2009 at 7:15
What steps will reproduce the problem?
1. On a 64 bit linux install. Try to compile the code so it can run on
a 32 bit machines. Run config with ./configure CFLAGS=-m32
2. make
3.
What is the expected output? What do you see instead?
I am expecting the library to compile fine. It does when I do not use the
CFLAGS=-m32. What I get instead is :
src/signalhandler.cc: In function `void* google::<unnamed>::GetPC(void*):
src/signalhandler.cc:72: error: `REG_EIP` was not declared in this scope
src/signalhandler.cc:72: warning unused variable `REG_EIP`
What version of the product are you using? On what operating system?
glog v0.2.1/v0.3.0
os : RHE4.0x64
Please provide any additional information below.
Thanks !
Original issue reported on code.google.com by [email protected]
on 4 Feb 2010 at 4:23
When trying to run tests out of tree with r85, it went a lot further than it
used to, but still didn't
succeed (this is on Mac OS X):
g++ -DHAVE_CONFIG_H -I. -I./src -I../trunk -I../trunk/src -D_THREAD_SAFE
-Wall -Wwrite-
strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -MT
logging_unittest-logging_unittest.o -MD -MP -MF
.deps/logging_unittest-logging_unittest.Tpo
-c -o logging_unittest-logging_unittest.o `test -f 'src/logging_unittest.cc' ||
echo
'../trunk/'`src/logging_unittest.cc
../trunk/src/logging_unittest.cc: In function ‘void TestDCHECK()’:
../trunk/src/logging_unittest.cc:562: error: ‘ASSERT_EQ’ was not declared
in this scope
make: *** [logging_unittest-logging_unittest.o] Error 1
make: Target `check' not remade because of errors.
I worked around that by duplicating the EXPECT_EQ definition (line 135 of
googletest.h).
The tests themselves seem to have other problems that I couldn't resolve
quickly:
make logging_striplog_test_sh demangle_unittest_sh signalhandler_unittest_sh
../trunk/src/logging_striplog_test.sh
../trunk/src/logging_striplog_test.sh: line 69: 74989 Abort trap
./logging_striptest2 2>
/dev/null
PASS
./demangle_unittest # force to create lt-demangle_unittest
Passed 2 tests
PASS
../trunk/src/demangle_unittest.sh
nm: can't open file: .libs/libglog.so (No such file or directory)
PASS
./signalhandler_unittest # force to create lt-signalhandler_unittest
OK
../trunk/src/signalhandler_unittest.sh
../trunk/src/signalhandler_unittest.sh: line 76: 75063 Segmentation fault
GOOGLE_LOG_DIR=.
$BINARY segv 2> signalhandler.out1
'main' should appear in the output
make[1]: *** [signalhandler_unittest_sh] Error 1
make: *** [check-am] Error 2
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 11:28
What steps will reproduce the problem?
1. Write a C++ file that uses LOG(WARN)
2. Try to compile it - it'll fail with the error COMPACT_GOOGLE_LOG_WARN is
not defined.
What is the expected output? What do you see instead?
The file should compile.
What version of the product are you using? On what operating system?
glog-0.3.0. Ubuntu 9.10.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Nov 2009 at 4:07
Hi, thank you for developing and maintaining the google-glog.
I found the bug that --enable-frame-pointers configure option doesn't work
properly.
The following is the step to reproduce and the patch that fixes the problem is
attached.
* What steps will reproduce the problem?
1. ./configure --enable-frame-pointers
* What is the expected output? What do you see instead?
The software should be compiled without -DNO_FRAME_POINTER, but not.
* What version of the product are you using? On what operating system?
0.3.0
* Please provide any additional information below.
This patch fixes the problem. The misuse of AC_ARG_ENABLE caused the bug.
Index: configure.ac
============================================================
=======
--- configure.ac (revision 76)
+++ configure.ac (working copy)
@@ -84,7 +84,7 @@
AC_ARG_ENABLE(frame_pointers,
AS_HELP_STRING([--enable-frame-pointers],
[On x86_64 systems, compile with -fno-omit-frame-pointer (see INSTALL)]),
- enable_frame_pointers=no)
+ , enable_frame_pointers=no)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])],
[is_x86_64=yes], [is_x86_64=no])
AM_CONDITIONAL(ENABLE_FRAME_POINTERS, test "$enable_frame_pointers" = yes)
Please commit the patch if it seems ok to you.
Thanks in advance.
Kazuki
Original issue reported on code.google.com by [email protected]
on 15 Apr 2010 at 8:06
Port from autotools to CMake so it can be built easily on other platforms
Original issue reported on code.google.com by [email protected]
on 15 Nov 2009 at 6:53
The current glog interface doesn't support user applications to emit binary
logs. Can an additional API be added that results in binary logs getting
written ?
Possibly, a BLOG() macro can be added, which takes the name of a component as
an argument and writes the string provided there in binary form. The size of
the string can be prepended before being dumped to the binary log file. The
name of the component would determine the name of the log file that is
produced on disk. This way, multiple components running within the same
process can produce different binary logs.
Original issue reported on code.google.com by [email protected]
on 21 Jan 2010 at 1:31
The test for gflags doesn't work correctly on OpenBSD.
Thankfully, the fix is very simple:
Index: configure.ac
===================================================================
--- configure.ac (revision 76)
+++ configure.ac (working copy)
@@ -12,6 +12,8 @@
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(src/config.h)
+AC_LANG(C++)
+
# Checks for programs.
AC_PROG_CC
AC_PROG_CPP
Original issue reported on code.google.com by [email protected]
on 26 May 2010 at 9:26
1. I created a multithread program.
2. Each thread logged to the log file.
3. Run program , my program was crashed.
Without logging to the file (I used google::LogToStderr()) , no problem
But with wrote logging , then crashed.
I'm sorry for my poor english.
Thanks for your reply.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2009 at 12:55
Need updated logging.h file the r.29 version of logging.cc
Thanks,
srinid
Original issue reported on code.google.com by [email protected]
on 18 Jan 2009 at 3:58
What steps will reproduce the problem?
1. Attempt to compile glog 0.3.0 with Mingw 4.4.1 (gcc.exe (TDM-2 mingw32)
4.4.1)
What is the expected output? What do you see instead?
Make produces following output:
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
-I./src -I
./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
-DNDEBUG
-g -O2 -MT libglog_la-logging.lo -MD -MP -MF .deps/libglog_la-logging.Tpo
-c -o
libglog_la-logging.lo `test -f 'src/logging.cc' || echo './'`src/logging.cc
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings
-Woverloaded-virt
ual -Wno-sign-compare -DNDEBUG -g -O2 -MT libglog_la-logging.lo -MD -MP -MF
.dep
s/libglog_la-logging.Tpo -c src/logging.cc -DDLL_EXPORT -DPIC -o
.libs/libglog_
la-logging.o
In file included from src/logging.cc:32:
src/utilities.h:78:19: error: port.h: No such file or directory
src/logging.cc:118: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:135: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:152: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:155: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:165: warning: dereferencing type-punned pointer will break
strict
-aliasing rules
src/logging.cc:208: warning: 'google::LogMessage::num_messages_' redeclared
with
out dllimport attribute: previous dllimport ignored
src/logging.cc:213: warning: 'google::LogSeverityNames' redeclared without
dllim
port attribute: previous dllimport ignored
src/logging.cc: In function 'const char*
google::GetLogSeverityName(google::LogS
everity)':
src/logging.cc:220: warning: 'const char*
google::GetLogSeverityName(google::Log
Severity)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:227: warning: 'virtual google::base::Logger::~Logger()'
redeclare
d without dllimport attribute: previous dllimport ignored
src/logging.cc:289: warning: 'void google::ReprintFatalMessage()'
redeclared wit
hout dllimport attribute: previous dllimport ignored
src/logging.cc:290: warning: 'google::base::Logger*
google::base::GetLogger(goog
le::LogSeverity)' redeclared without dllimport attribute: previous
dllimport ign
ored
src/logging.cc:291: warning: 'void google::base::SetLogger(google::LogSeverity,
google::base::Logger*)' redeclared without dllimport attribute: previous
dllimpo
rt ignored
src/logging.cc: In member function 'bool
google::<unnamed>::LogFileObject::Creat
eLogfile(const char*)':
src/logging.cc:722: error: 'symlink' was not declared in this scope
src/logging.cc: In member function 'virtual void
google::<unnamed>::LogFileObjec
t::Write(bool, time_t, const char*, int)':
src/logging.cc:764: error: 'localtime_r' was not declared in this scope
src/logging.cc: At global scope:
src/logging.cc:906: warning: 'google::LogMessage::kMaxLogMessageLen' redeclared
without dllimport attribute after being referenced with dll linkage
src/logging.cc:923: warning:
'google::LogMessage::fatal_msg_data_exclusive_' red
eclared without dllimport attribute: previous dllimport ignored
src/logging.cc:924: warning: 'google::LogMessage::fatal_msg_data_shared_'
redecl
ared without dllimport attribute: previous dllimport ignored
src/logging.cc:926: warning:
'google::LogMessage::LogMessageData::~LogMessageDat
a()' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc:931: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, int, void (google::LogMessage::*)())' redeclared
without dll
import attribute: previous dllimport ignored
src/logging.cc:937: warning: 'google::LogMessage::LogMessage(const char*,
int, c
onst google::CheckOpString&)' redeclared without dllimport attribute:
previous d
llimport ignored
src/logging.cc:943: warning: 'google::LogMessage::LogMessage(const char*, int)'
redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc:947: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity)' redeclared without dllimport attribute after being
referenc
ed with dll linkage
src/logging.cc:951: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, google::LogSink*, bool)' redeclared without dllimport
attrib
ute: previous dllimport ignored
src/logging.cc:958: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, std::vector<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<
char>, std::allocator<char> > > >*)' redeclared without dllimport
attribute: pre
vious dllimport ignored
src/logging.cc:964: warning: 'google::LogMessage::LogMessage(const char*,
int, g
oogle::LogSeverity, std::string*)' redeclared without dllimport attribute:
previ
ous dllimport ignored
src/logging.cc:970: warning: 'void google::LogMessage::Init(const char*,
int, go
ogle::LogSeverity, void (google::LogMessage::*)())' redeclared without
dllimport
attribute after being referenced with dll linkage
src/logging.cc: In member function 'void google::LogMessage::Init(const
char*, i
nt, google::LogSeverity, void (google::LogMessage::*)())':
src/logging.cc:1010: error: 'localtime_r' was not declared in this scope
src/logging.cc: At global scope:
src/logging.cc:1054: warning: 'google::LogMessage::~LogMessage()'
redeclared wit
hout dllimport attribute after being referenced with dll linkage
src/logging.cc:1061: warning: 'void google::LogMessage::Flush()' redeclared
with
out dllimport attribute after being referenced with dll linkage
src/logging.cc:1131: warning: 'void google::LogMessage::SendToLog()' redeclared
without dllimport attribute after being referenced with dll linkage
src/logging.cc:1220: warning: 'void
google::LogMessage::RecordCrashReason(google
::glog_internal_namespace_::CrashReason*)' redeclared without dllimport
attribut
e after being referenced with dll linkage
src/logging.cc:1246: error: definition of 'void (*
google::g_logging_fail_func)(
)volatile' is marked 'dllimport'
src/logging.cc: In function 'void google::InstallFailureFunction(void (*)())':
src/logging.cc:1251: warning: 'void google::InstallFailureFunction(void (*)())'
redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:1255: warning: 'static void google::LogMessage::Fail()'
redeclare
d without dllimport attribute after being referenced with dll linkage
src/logging.cc:1260: warning: 'void google::LogMessage::SendToSink()'
redeclared
without dllimport attribute after being referenced with dll linkage
src/logging.cc:1273: warning: 'void google::LogMessage::SendToSinkAndLog()'
rede
clared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1279: warning: 'void google::LogMessage::SaveOrSendToLog()'
redec
lared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1292: warning: 'void
google::LogMessage::WriteToStringAndLog()' r
edeclared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1305: warning: 'void
google::LogMessage::SendToSyslogAndLog()' re
declared without dllimport attribute: previous dllimport ignored
src/logging.cc:1338: warning: 'static google::int64
google::LogMessage::num_mess
ages(int)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'std::ostream&
google::operator<<(std::ostream&, con
st google::PRIVATE_Counter&)':
src/logging.cc:1345: warning: 'std::ostream&
google::operator<<(std::ostream&, c
onst google::PRIVATE_Counter&)' redeclared without dllimport attribute:
previous
dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:1352: warning:
'google::ErrnoLogMessage::ErrnoLogMessage(const ch
ar*, int, google::LogSeverity, int, void (google::LogMessage::*)())' redeclared
without dllimport attribute: previous dllimport ignored
src/logging.cc:1358: warning: 'google::ErrnoLogMessage::~ErrnoLogMessage()'
rede
clared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::FlushLogFiles(google::LogSeverity)':
src/logging.cc:1366: warning: 'void google::FlushLogFiles(google::LogSeverity)'
redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::FlushLogFilesUnsafe(google::LogSeverit
y)':
src/logging.cc:1370: warning: 'void
google::FlushLogFilesUnsafe(google::LogSever
ity)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::SetLogDestination(google::LogSeverity,
const char*)':
src/logging.cc:1374: warning: 'void
google::SetLogDestination(google::LogSeverit
y, const char*)' redeclared without dllimport attribute: previous dllimport
igno
red
src/logging.cc: In function 'void
google::SetLogSymlink(google::LogSeverity, con
st char*)':
src/logging.cc:1378: warning: 'void
google::SetLogSymlink(google::LogSeverity, c
onst char*)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: At global scope:
src/logging.cc:1382: warning: 'virtual google::LogSink::~LogSink()'
redeclared w
ithout dllimport attribute: previous dllimport ignored
src/logging.cc:1385: warning: 'virtual void
google::LogSink::WaitTillSent()' red
eclared without dllimport attribute after being referenced with dll linkage
src/logging.cc:1389: warning: 'static std::string
google::LogSink::ToString(goog
le::LogSeverity, const char*, int, const tm*, const char*, size_t)'
redeclared w
ithout dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::AddLogSink(google::LogSink*)':
src/logging.cc:1418: warning: 'void google::AddLogSink(google::LogSink*)'
redecl
ared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::RemoveLogSink(google::LogSink*)':
src/logging.cc:1422: warning: 'void
google::RemoveLogSink(google::LogSink*)' red
eclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::SetLogFilenameExtension(const
char*)':
src/logging.cc:1426: warning: 'void google::SetLogFilenameExtension(const
char*)
' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::SetStderrLogging(google::LogSeverity)'
:
src/logging.cc:1430: warning: 'void
google::SetStderrLogging(google::LogSeverity
)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void
google::SetEmailLogging(google::LogSeverity, c
onst char*)':
src/logging.cc:1434: warning: 'void
google::SetEmailLogging(google::LogSeverity,
const char*)' redeclared without dllimport attribute: previous dllimport
ignore
d
src/logging.cc: In function 'void google::LogToStderr()':
src/logging.cc:1438: warning: 'void google::LogToStderr()' redeclared
without dl
limport attribute: previous dllimport ignored
src/logging.cc: In function 'bool google::SendEmail(const char*, const
char*, co
nst char*)':
src/logging.cc:1513: warning: 'bool google::SendEmail(const char*, const char*,
const char*)' redeclared without dllimport attribute: previous dllimport
ignored
src/logging.cc: In function 'const std::vector<std::basic_string<char,
std::char
_traits<char>, std::allocator<char> >,
std::allocator<std::basic_string<char, st
d::char_traits<char>, std::allocator<char> > > >&
google::GetLoggingDirectories(
)':
src/logging.cc:1568: warning: 'const std::vector<std::basic_string<char,
std::ch
ar_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >&
google::GetLoggingDirectorie
s()' redeclared without dllimport attribute after being referenced with dll
link
age
src/logging.cc: In function 'void
google::GetExistingTempDirectories(std::vector
<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::al
locator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >
>*)':
src/logging.cc:1598: warning: 'void
google::GetExistingTempDirectories(std::vect
or<std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
std::
allocator<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >
> >*)' redeclared without dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'void google::TruncateLogFile(const char*,
google::i
nt64, google::int64)':
src/logging.cc:1612: warning: 'void google::TruncateLogFile(const char*,
google:
:int64, google::int64)' redeclared without dllimport attribute: previous
dllimpo
rt ignored
src/logging.cc: In function 'void google::TruncateLogFile(const char*,
google::i
nt64, google::int64)':
src/logging.cc:1621: error: 'O_NOFOLLOW' was not declared in this scope
src/logging.cc:1631: error: 'truncate' was not declared in this scope
src/logging.cc:1660: error: 'pread' was not declared in this scope
src/logging.cc:1661: error: 'pwrite' was not declared in this scope
src/logging.cc: In function 'void google::TruncateStdoutStderr()':
src/logging.cc:1687: warning: 'void google::TruncateStdoutStderr()'
redeclared w
ithout dllimport attribute: previous dllimport ignored
src/logging.cc: In function 'std::string* google::CheckstrcmptrueImpl(const
char
*, const char*, const char*)':
src/logging.cc:1713: warning: 'std::string*
google::CheckstrcmptrueImpl(const ch
ar*, const char*, const char*)' redeclared without dllimport attribute:
previous
dllimport ignored
src/logging.cc: In function 'std::string*
google::CheckstrcmpfalseImpl(const cha
r*, const char*, const char*)':
src/logging.cc:1714: warning: 'std::string*
google::CheckstrcmpfalseImpl(const c
har*, const char*, const char*)' redeclared without dllimport attribute:
previou
s dllimport ignored
src/logging.cc: In function 'std::string* google::CheckstrcasecmptrueImpl(const
char*, const char*, const char*)':
src/logging.cc:1715: warning: 'std::string*
google::CheckstrcasecmptrueImpl(cons
t char*, const char*, const char*)' redeclared without dllimport attribute:
prev
ious dllimport ignored
src/logging.cc: In function 'std::string*
google::CheckstrcasecmpfalseImpl(const
char*, const char*, const char*)':
src/logging.cc:1716: warning: 'std::string*
google::CheckstrcasecmpfalseImpl(con
st char*, const char*, const char*)' redeclared without dllimport
attribute: pre
vious dllimport ignored
src/logging.cc: In function 'int google::posix_strerror_r(int, char*, size_t)':
src/logging.cc:1719: warning: 'int google::posix_strerror_r(int, char*,
size_t)'
redeclared without dllimport attribute after being referenced with dll linkage
src/logging.cc: In function 'int google::posix_strerror_r(int, char*, size_t)':
src/logging.cc:1731: error: 'strerror_r' was not declared in this scope
src/logging.cc: At global scope:
src/logging.cc:1769: warning:
'google::LogMessageFatal::LogMessageFatal(const ch
ar*, int)' redeclared without dllimport attribute after being referenced
with dl
l linkage
src/logging.cc:1772: warning:
'google::LogMessageFatal::LogMessageFatal(const ch
ar*, int, const google::CheckOpString&)' redeclared without dllimport attribute
after being referenced with dll linkage
src/logging.cc:1776: warning: 'google::LogMessageFatal::~LogMessageFatal()'
rede
clared without dllimport attribute after being referenced with dll linkage
make: *** [libglog_la-logging.lo] Error 1
What version of the product are you using? On what operating system?
Windows Vista
Glog 0.3.0
MinGW (gcc.exe (TDM-2 mingw32) 4.4.1)
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 14 Jan 2010 at 6:41
What steps will reproduce the problem?
1. Prepare a C++ file that includes glog/logging.h and uses the CHECK()
macro.
2. Compile the C++ using -DNDEBUG flag.
What is the expected output? What do you see instead?
The file should compile. Instead there are a lot of errors seen
that complain about GetReferenceableValue() not defined. The issue is the
following code in glog/logging.h:
// In optimized mode, use CheckOpString to hint to compiler that
// the while condition is unlikely.
#define CHECK_OP_LOG(name, op, val1, val2, log) \
while (google::CheckOpString _result = \
google::Check##name##Impl(GetReferenceableValue(val1), \
GetReferenceableValue(val2), \
#val1 " " #op " " #val2)) \
log(__FILE__, __LINE__, _result).stream()
#endif // STATIC_ANALYSIS, !NDEBUG
The above code needs to replace GetReferenceableValue with
google::GetReferenceableValue .
What version of the product are you using? On what operating system?
Version 0.3.0. Ubuntu 9.10.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 5 Nov 2009 at 3:38
It would be really nice if you released amd64 arch binary packages for
Debian/Ubuntu. Is this feasible?
Original issue reported on code.google.com by [email protected]
on 3 May 2010 at 11:01
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.