NSLogger icon indicating copy to clipboard operation
NSLogger copied to clipboard

Definition of 'tm' must be imported from module 'Darwin.C.time' before it is required

Open twoputt opened this issue 7 years ago • 3 comments
trafficstars

Hi,

In LoggerClient.m I'm receiving an error in the routine LoggerLogToConsole: Definition of 'tm' must be imported from module 'Darwin.C.time' before it is required I found similar issues from a couple of years ago to #import <sys/time.h> would solve it, however, you already do that and the problem persists.

Any thoughts?

twoputt avatar Nov 20 '18 00:11 twoputt

Hi Red,

Sorry about this issue. It's weird as I'm not seeing this issue at all -- which Xcode / SDK / target OS are you compiling for ?

fpillet avatar Nov 27 '18 13:11 fpillet

Thanks for your response. To answer your question, I'm using Xcode 10.1 and I tried targeting iOS 9.x, iOS 10.x, and iOS 12.x. All to no avail.

I did circumvent this issue by using Foundation / NSDate operations, as I only need this to work for MacOS and iOS. Frankly, I think this is an Xcode issue given sys/time.h is an Apple Darwin header. I could also be wrong ;-)

twoputt avatar Nov 27 '18 14:11 twoputt

Wicked! I'll definitely check this out soon. Compilation should never be an issue.

BTW hit me up on my private email (fpillet at gmail), I remember your name from when you were at Dataviz (I'm the author of Powerglot) :)

fpillet avatar Nov 27 '18 14:11 fpillet