sibojia / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

Changes needed for building under windows #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 hora...@gmail.com on 30 Dec 2008 at 2:15

GoogleCodeExporter commented 9 years ago
Thanks for the suggestions. I'll fix the latter issue soon.

About the former issue, config.h is intended to be a private header so that 
public 
header logging.h should not include config.h. I'm not sure if I understand what 
you 
would like to do correctly, but you may want to link glog statically? If so, 
you may 
need to add "/D GOOGLE_GLOG_DLL_DECL=" option when you compiles .cc files (or 
add 
#define GOOGLE_GLOG_DLL_DECL before you include logging.h). If you think the 
solution 
isn't handy, please let me know.

Thanks!

Original comment by shinichi...@gmail.com on 23 Jan 2009 at 12:03

GoogleCodeExporter commented 9 years ago
I've noticed that issues are not forwarded to google-glog groups. Now I 
modified the 
configuration and this message should be posted.

Original comment by shinichi...@gmail.com on 23 Jan 2009 at 12:11

GoogleCodeExporter commented 9 years ago
Yes, I am trying to statically link glog.  

Ideally, the user wouldn't have to do anything more than

#include "glog/logging.h"

in order to use logging.h... would kind of suck to have to change the includes
everywhere just because you decide to go from dynamic to static linking.

Thanks for looking at this.

Original comment by hora...@gmail.com on 23 Jan 2009 at 2:10

GoogleCodeExporter commented 9 years ago
The unnecessary #include should be fixed by this change. Thanks for the report!

http://code.google.com/p/google-glog/source/detail?r=31

For the static link issue, I added static link library project and statically 
linked 
unittest project.

http://code.google.com/p/google-glog/source/detail?r=33

See README.windows for detail.

http://code.google.com/p/google-glog/source/browse/trunk/README.windows?
spec=svn35&r=35

I hope this satisfies your requirements, but I'm not sure if it works for you 
since 
I'm not good at windows programming. Please let me know if you need something 
more.

For now, I'll close this bug.

Original comment by shinichi...@gmail.com on 23 Jan 2009 at 7:37

GoogleCodeExporter commented 9 years ago

Original comment by shinichi...@gmail.com on 23 Jan 2009 at 7:38