News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

How to beep?

Started by Shiyin, December 27, 2008, 01:58:46 AM

Previous topic - Next topic

Shiyin

Hi. I want to cause the computer speaker to beep in Pelles C as is possible in MS VC++ with Beep(frequency in Hz, duration in milliseconds); under <windows.h>. I've tried this & other methods from the web but in Pelles C long lists of error messages appear.

If there are any other comparably simple ways to make a sound which can be specified in pitch & duration, please post it.

Thanks.

Robert

From the FAQ

http://forum.pellesc.de/index.php?board=10.0

By default, the compiler only accepts standard C. To compile a Windows program, you need to enable Microsoft extensions in the compiler. In the IDE, go to Project Options and make sure Enable Microsoft Extensions is checked on the Compiler tab. From the command line, make sure you use the /Ze compiler option.

Robert Wishlaw

Shiyin

Thanks Robert. I finally have my program beeping now.

Shiyin.