Gnat linking problem to Microsoft Visual C++ V6.0 (PlaySound) 
Author Message
 Gnat linking problem to Microsoft Visual C++ V6.0 (PlaySound)

I'm writing an Gnat (3.10p) ada application that has external references to
single threaded libraries that have been created using the Visual C++
compiler.

These libraries make use of 'libwinmm.a' library. Unfortunately the
prototype declaration for PlaySound is
different between the c++ and Gnat compilers.

Does anybody have a solution to this problem.

Note I do note have the source for the c++ code and the undefined reference
is to :



Sun, 11 Mar 2001 03:00:00 GMT  
 Gnat linking problem to Microsoft Visual C++ V6.0 (PlaySound)

Quote:

> I'm writing an Gnat (3.10p) ada application that has external references to
> single threaded libraries that have been created using the Visual C++
> compiler.

I'm confused. GNAT 3.10p does not support the MS object file format.
Have you used some converter to allow this?

Quote:
> These libraries make use of 'libwinmm.a' library. Unfortunately the
> prototype declaration for PlaySound is

                            ^^^^^^^^^
Quote:
> different between the c++ and Gnat compilers.

> Does anybody have a solution to this problem.

> Note I do note have the source for the c++ code and the undefined reference
> is to :


              ^^^^^^^^^^^^^

Above you reference "PlaySound", here you reference "sndPlaySound".
Check your Win32 help; both functions exist, and are not the same.

Hope this helps more than it hurts :).

-- Stephe



Sun, 11 Mar 2001 03:00:00 GMT  
 Gnat linking problem to Microsoft Visual C++ V6.0 (PlaySound)
Quote:
>prototype declaration for PlaySound is
>different between the c++ and Gnat compilers.

>Does anybody have a solution to this problem.

The prototype CLAW uses internally for PlaySound, which works with Gnat,
is:
    function PlaySound (Sound : in Claw.Win32.Lpcstr;
        Module : in HModule; Flag : in Sound_Flags)
    return Claw.Win32.Bool;
    pragma Import (Stdcall,PlaySound,"PlaySoundA");


Sun, 11 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Linking GCC/Gnat and Microsoft Visual C++ libs

2. Mixing Compaq Visual Fortran 6 with Microsoft Visual C++ .NET

3. Question on using Compaq Visual FORTRAN with Microsoft Visual C++ 6.0

4. FORTRAN and C/C++ in Microsoft Visual C++ 1.51 and MS PowerStation

5. Visual C++ 6.0/DVF 6.0 linking problem

6. calling Microsoft PlaySound routine from CVF

7. problem with GNAT adagide v3.11p (adagide v6.21p)

8. problem with GNAT adagide v3.11p (adagide v6.21p)

9. Interfacing CW20 with Microsoft Visual C++

10. CW and Microsoft Visual C/C++

11. Fwd: CW and Microsoft Visual C/C++

 

 
Powered by phpBB® Forum Software