On Saturday 26 September 2009 17:28:49 Christian O'Reilly wrote:
> Hi,
> 
> I'm trying to compite boostpythongenerator-0.3 under windows (with MinGW,
> gcc 3.4.5). I get an error ("error ISO C++ forbids casting between
> pointer-to-function and pointer-to-object") on line 124 of the file
> main.cpp. The line in questions is included in the code section below :
> 
> 122   if (!generatorSet.isEmpty()) {
> 123        QLibrary plugin(generatorSet+"_generator");
> 124        getGeneratorsFunc getGenerators =
> reinterpret_cast<getGeneratorsFunc>(plugin.resolve("getGenerators"));
> 125        if (getGenerators)
> 126            generators = getGenerators();
> 127        else {
> 128            std::cerr << argv[0] << ": Error loading generatorset
>  plugin: " << qPrintable(plugin.errorString()) << std::endl;
> 129            return EXIT_FAILURE;
> 130        }
> 131    }
> 
> I'm not sure what to do about it. QLibrary::resolve does return a void*
> which the code try to cast to a function pointer (i.e.getGeneratorsFunc is
> defined by "typedef QLinkedList<Generator*> (*getGeneratorsFunc)();") ans
> this does seem not to be a portable line of code (you may read the
> discussion on
> http://www.velocityreviews.com/forums/t288899-reinterpret-cast-problem.html
> ).
> 
> Any idea?
> 

Fixed, just waiting for code review and merge.
http://qt.gitorious.org/pyside/boostpythongenerator/merge_requests/1635

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to