[Openal] OpenAL with C++ WindowsForm application?

Pierre-Henri François Pierre-Henri.Francois at sensitive-object.com
Mon Sep 28 08:06:41 PDT 2009


I had the same problem with previous version, and the solution was to put the non-managed #include in top of the file... as follow (in my case)

	// ILT-TP.cpp : fichier projet principal.
	#include "AudioRecorder.h"
	#include "stdafx.h"

You also need to ask a /clr option (not /clr:pure).
I hope it can help...

Pierre-Henri


-----Message d'origine-----
De : openal-bounces at opensource.creative.com [mailto:openal-bounces at opensource.creative.com] De la part de Jason Daly
Envoyé : lundi 28 septembre 2009 16:48
À : Ümit Uzun
Cc : OpenAL
Objet : Re: [Openal] OpenAL with C++ WindowsForm application?


I'm not an authority on CLR or Forms, but I do know that if you want to 
use OpenAL with the CLR, you'll have to wrap the library so you can 
access the native OpenAL methods from your managed code.

I don't know much more than that, as I haven't had to do it yet myself.  
Maybe someone else can give you more specific help, or you could do some 
Google searching on using native C functions from managed C++

--"J"



Ümit Uzun wrote:
> Hi All,
>
> I have an application which had created with MFC before and now I want 
> to upgrade it with new OpenAL 1.1 version and Windows Form. I have 
> created new C++ WindowsForm project in VS2008 and only add framework 
> and set related include and library configurations. But when I compile 
> I always get
>
> .\OpenAL\framework\Win32\Framework.cpp(200) : error C2664: 
> 'CWaves::GetWaveALBufferFormat' : cannot convert parameter 2 from 
> 'ALenum (__cdecl *)(const ALchar *)' to 'PFNALGETENUMVALUE'
> Address of a function yields __clrcall calling convention in /clr:pure 
> and /clr:safe; consider using __clrcall in target type
>
> error which I can't find anything at internet about. I think it is 
> related about /clr because we have to use CommonLanguageRuntimeSupport 
> beside with MFC we don't need clr.
>
> How can I solve my problem?
> Do you think I can create OpenAL based application which uses 
> framework like before with Windows Form or not?
>
> Regards.
>
> Ümit Uzun

_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal



More information about the Openal mailing list