ears icon indicating copy to clipboard operation
ears copied to clipboard

AuxiliaryEffect function is not exported

Open zoumi opened this issue 6 years ago • 1 comments

image It seem that AuxiliaryEffect function is not exported by OpenAL?

In the example code of OpenAL,we can see:

		alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)alGetProcAddress("alGenAuxiliaryEffectSlots");
		alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)alGetProcAddress("alDeleteAuxiliaryEffectSlots");
		alIsAuxiliaryEffectSlot = (LPALISAUXILIARYEFFECTSLOT)alGetProcAddress("alIsAuxiliaryEffectSlot");
		alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)alGetProcAddress("alAuxiliaryEffectSloti");
		alAuxiliaryEffectSlotiv = (LPALAUXILIARYEFFECTSLOTIV)alGetProcAddress("alAuxiliaryEffectSlotiv");
		alAuxiliaryEffectSlotf = (LPALAUXILIARYEFFECTSLOTF)alGetProcAddress("alAuxiliaryEffectSlotf");
		alAuxiliaryEffectSlotfv = (LPALAUXILIARYEFFECTSLOTFV)alGetProcAddress("alAuxiliaryEffectSlotfv");
		alGetAuxiliaryEffectSloti = (LPALGETAUXILIARYEFFECTSLOTI)alGetProcAddress("alGetAuxiliaryEffectSloti");
		alGetAuxiliaryEffectSlotiv = (LPALGETAUXILIARYEFFECTSLOTIV)alGetProcAddress("alGetAuxiliaryEffectSlotiv");
		alGetAuxiliaryEffectSlotf = (LPALGETAUXILIARYEFFECTSLOTF)alGetProcAddress("alGetAuxiliaryEffectSlotf");
		alGetAuxiliaryEffectSlotfv = (LPALGETAUXILIARYEFFECTSLOTFV)alGetProcAddress("alGetAuxiliaryEffectSlotfv");

So,these functions are dynamic called?

zoumi avatar Dec 31 '19 10:12 zoumi

EDIT: I just built openal-soft from source (using visual studio community 2017) instead of downloading and using the pre-built binaries from the site... Then it "just worked" -- cargo build without a hiccup. Also, commenting out the offending rust code worked as well (but building openal-soft from source is the better option, of course, since that allows me to include the reverb code and I can ensure it's compiled with sse2/3/4.1). Not sure what's up with the prebuilt openal-soft files -- but it looks like they were built with mingw because it includes a .def file, and those 7 functions were missing for whatever reason.

MY ORIGINAL RESPONSE: I get something like this when trying to build ears using msvc toolchain -- I know we're supposed to use the gnu toolchain, but I'd prefer using msvc. I also suspect these 7 functions are going to be in the dll, but I'm unsure what I'd need to do next to have ears build.

= note:    Creating library z:/rust_target\debug\deps\ears-4abd280d97776022.dll.lib and object z:/rust_target\debug\deps\ears-4abd280d97776022.dll.exp
         ears-4abd280d97776022.ears.5pv1cvf6-cgu.12.rcgu.o : error LNK2019: unresolved external symbol alDeleteEffects referenced in function _ZN75_$LT$ears..reverb_effect..ReverbEffect$u20$as$u20$core..ops..drop..Drop$GT$4drop17h8d092cf066574a6dE
         ears-4abd280d97776022.ears.5pv1cvf6-cgu.12.rcgu.o : error LNK2019: unresolved external symbol alDeleteAuxiliaryEffectSlots referenced in function _ZN75_$LT$ears..reverb_effect..ReverbEffect$u20$as$u20$core..ops..drop..Drop$GT$4drop17h8d092cf066574a6dE

         ears-4abd280d97776022.ears.5pv1cvf6-cgu.14.rcgu.o : error LNK2019: unresolved external symbol alGenAuxiliaryEffectSlots referenced in function _ZN4ears6openal2al25alGenAuxiliaryEffectSlots17hc33cd3f54257bc3dE
         ears-4abd280d97776022.ears.5pv1cvf6-cgu.14.rcgu.o : error LNK2019: unresolved external symbol alGenEffects referenced in function _ZN4ears6openal2al12alGenEffects17h59203129aec02b0aE
         ears-4abd280d97776022.ears.5pv1cvf6-cgu.14.rcgu.o : error LNK2019: unresolved external symbol alAuxiliaryEffectSloti referenced in function _ZN4ears6openal2al22alAuxiliaryEffectSloti17h214d42f821d67139E
         ears-4abd280d97776022.ears.5pv1cvf6-cgu.14.rcgu.o : error LNK2019: unresolved external symbol alEffecti referenced in function _ZN4ears6openal2al9alEffecti17he9679966d4595dfaE
         ears-4abd280d97776022.ears.5pv1cvf6-cgu.14.rcgu.o : error LNK2019: unresolved external symbol alEffectf referenced in function _ZN4ears6openal2al9alEffectf17h215f1800c17a4ba2E
         z:/rust_target\debug\deps\ears-4abd280d97776022.dll : fatal error LNK1120: 7 unresolved externals

I did test using the gnu toolchain (following the directions from the main page), and it does work that way -- I'd just rather stick with the msvc toolchain. I may just try commenting out the code that references those 7 functions since it just looks like it's for effects.

daemonjax avatar Apr 08 '20 15:04 daemonjax