Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Windows 10 BUILD_SHARED_LIBS ON localtime_r error , __declspec(dllimport) syntax error #343

@ghost

Description

OS : Windows 10 - Visual studio 2017

I am trying to build glog from the source with BUILD_SHARED_LIBS flag ON, but i got a lot of __declspec(dllimport) syntax error that relate to following line in the code :
#ifndef HAVE_LOCALTIME_R
extern struct tm* GOOGLE_GLOG_DLL_DECL localtime_r(const time_t* timep, struct tm* result);
#endif // not HAVE_LOCALTIME_R
// port.h line 159

also another error at logging.cc line 992. as following
localtime_r identifier not found
....>> localtime_r(&timestamp, &tm_time);

I attached screenshot for farther clarification
screenshot 37

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions