NO

Author Topic: I like Pelles C, I have a question  (Read 5597 times)

Greg

  • Guest
I like Pelles C, I have a question
« on: December 18, 2004, 10:59:03 pm »
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

  • Guest
I like Pelles C, I have a question
« Reply #1 on: December 18, 2004, 11:11:33 pm »
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

  • Guest
I like Pelles C, I have a question
« Reply #2 on: December 18, 2004, 11:19:05 pm »
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

  • Guest
I like Pelles C, I have a question
« Reply #3 on: December 18, 2004, 11:30:59 pm »
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

  • Guest
I like Pelles C, I have a question
« Reply #4 on: December 19, 2004, 12:28:08 am »
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:
Code: [Select]
POLINK: warning: Multiple '.rdata' sections found with different attributes (0x40000040 and 0xc0000040).

Not sure exactly what that means.

Larry

  • Guest
I like Pelles C, I have a question
« Reply #5 on: December 19, 2004, 02:50:27 am »
I had gotten advice to add this to my code...
Code: [Select]
#pragma comment(linker,"/merge:.rdata=.text")
but then I could not UPX pack my EXE, so I ignore the warning...

Lar.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2174
    • http://www.smorgasbordet.com
I like Pelles C, I have a question
« Reply #6 on: December 19, 2004, 05:11:57 pm »
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:
Code: [Select]
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

  • Guest
I like Pelles C, I have a question
« Reply #7 on: December 19, 2004, 08:32:35 pm »
Pelle,

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