Re: beep in Windows XP x64



On Mon, 12 Jan 2009 20:21:20 -0700, "James Van Buskirk"
<not_valid@xxxxxxxxxxx> wrote:

I'll bet money on that! IIRC his system and gfortran is 64 bits.

Yes. Also the subject line gives it away. Unfortunately, although
it would likely take a one-line fix to make gfortran work like g95
does on 32-bit Windows, where one can write:

function MessageBeep(uType) bind(C,name='MessageBeep@4')

in gfortran one gets the error message:

Invalid C name in NAME= specifier at (1)

Why can't that be fixed simply by continuing rather than checking
for validity?

I had missed the x64 in the subject line, but the OP's wanting CVF as well
meant that IA-32 issues were still valid.

I would not expect adding @4 to work in the NAME= specifier. This is to give
the name as it would be written in C, not the fully decorated name (which also
has a leading underscore). The compiler is expected to add any decoration
that the "companion C processor" would. Even if you succeeded here, you also
need to get the compiler to use STDCALL semantics so that the stack doesn't
get popped twice.

Given that the default behavior (in absence of /Gm, etc.) of C compilers on
IA-32 Windows is to use the C mechanism, there is no standard-conforming way
to specify STDCALL and you'll need to resort to extensions.

I'll comment that writing CHAR(7) (or ACHAR(7) works only if you've got a
console application, whereas calling MessageBeep will work for any application
type.
--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Fortran Support
http://support.intel.com/support/performancetools/fortran
My Fortran blog
http://www.intel.com/software/drfortran
.



Relevant Pages

  • Re: hmm..interesting
    ... you've got a discussion of ARM vs Intel architecture here: ... And ARM is rapidly running away from RISC. ... mainstream (many netbooks and smartphones run Linux instead of Windows ... And hardly any C compiler does. ...
    (comp.sys.acorn.hardware)
  • Re: Stalin ported to Windows.
    ... Therefore, the compiler ... Stalin from Scheme sources; it took six hours to generate the C ...   Junia and Reane  got a working Windows port from the C ...
    (comp.lang.scheme)
  • Re: hmm..interesting
    ... work out at more power per Watt than x86. ... mainstream (many netbooks and smartphones run Linux instead of Windows ... the fact that Visual Studio allows you to get away with fairly sloppy ... difficult to find a C compiler that *doesn't* have vendor-specific ...
    (comp.sys.acorn.hardware)
  • Re: C++ programming migration from DOS to Windows
    ... compiler, so the current compiler is quite competitive WRT to ... There are a couple of ports of gcc to Windows. ... Comeau is more or less unique: the best language conformance you can ... IDEs: Microsoft and Borland have both produced decent IDEs in the past, ...
    (comp.lang.cpp)
  • Re: Future for VC++ Programmers
    ... bluescreening the system (crash X windows). ... Especially the kind who speak their native language as a second ... I don't want an environment in which the compiler, the linker, and the debugger will, at ...
    (microsoft.public.vc.mfc)