DynamicLibrary and void*

Discussion and support for general JUCE issues

DynamicLibrary and void*

Postby TheVinn » Tue May 29, 2012 3:38 pm

From what I'm hearing, a pointer to function is not guaranteed to fit into a void*. This could be a problem with DynamicLibrary::getFunction(). I had to use a reinterpret_cast, which is an indicator of a possible issue.
Open Source: LayerEffects, VFLib, SimpleDJ, DSP Filters, LuaBridge, JUCE, FreeType, TagLib
"This isn't a big project, it shouldn't take long." - Jules
User avatar
TheVinn
JUCE UberWeenie
 
Posts: 2975
Joined: Sat Aug 29, 2009 11:31 am
Location: Marina del Rey, California

Re: DynamicLibrary and void*

Postby jules » Tue May 29, 2012 3:49 pm

I think that C function pointers will always fit in a void*... Right..?

Obviously method pointers are a different story, but a library can only export C-style functions.
User avatar
jules
Fearless Leader
 
Posts: 17204
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to General JUCE discussion

Who is online

Users browsing this forum: Rail Jon Rogut and 3 guests