I like Pelles C, I have a question

Started by Greg, December 18, 2004, 10:59:03 PM

Previous topic - Next topic

Greg

I have been using Pelles C and really like it. It's a very good C compiler.

I have a program that uses the _tzset function and the variables _daylight, _timezone, _tzname[]. It seems Pelles C does not support this function and these variables? This also seems to effect the timezone and dstflag fields in the _timeb structure. I realize these are Microsoft extensions and not standard C. I could use Win32 API functions to do the same thing.

Thanks,

Greg

Ceci

Hi Greg:

Why don't you check Proyect->Compiler->Options, and turn on Microsoft Extensions.?

If that dosn't work why don't you check if you're in the right environment, that is, in the console or the windows system.

bye
Ceci

Greg

Ceci,

I tried turning on the Microsoft extensions, it didn't work. I don't think they're  supported. No big deal. It's kind of nice that it forces you to use standard C.

Greg

Ceci

Hi again, Greg

I'm no expert, but Pelles C does support Microsoft extensions.

You may also try the right Wizard,  there are two options for the console.
You may not have the correct default libraries set for what you call "plain C"

bye bye

Ceci

Greg

OK, _tzset etc. are not declared in Pelles C 'time.h'. I added my own declares and set the linker to include 'msvcrt.lib' and they work. 'crt.lib' must not support _tzset etc.

I am getting this warning though:
POLINK: warning: Multiple '.rdata' sections found with different attributes (0x40000040 and 0xc0000040).

Not sure exactly what that means.

Larry

I had gotten advice to add this to my code...
#pragma comment(linker,"/merge:.rdata=.text")
but then I could not UPX pack my EXE, so I ignore the warning...

Lar.

Pelle

Quote from: "Greg"OK, _tzset etc. are not declared in Pelles C 'time.h'.
Not for the moment. I will look into possibly implementing this extension in the future...
Quote from: "Greg"
I am getting this warning though:
POLINK: warning: Multiple '.rdata' sections found with different attributes (0x40000040 and 0xc0000040).
It's a known disagreement between Microsoft and Pelles C about a memory block (should it be read-only or read-write). The linker should do the "right thing" - or rather "the least bad thing". Not high priority, but some day I will fix this warning.

Pelle
/Pelle

Greg

Pelle,

Thanks for the explanation. I am really liking Pelle's C.