[QGIS-trac] Re: [Quantum GIS] #234: ISO C++ forbids casting between pointer-to-function and pointer-to-object

Quantum GIS qgis at qgis.org
Sat Aug 23 10:47:24 EDT 2008


#234: ISO C++ forbids casting between pointer-to-function and pointer-to-object
----------------------------------------------------+-----------------------
        Reporter:  mloskot                          |         Owner:  gsherman                
            Type:  enhancement                      |        Status:  new                     
        Priority:  minor: annoyance or enhancement  |     Milestone:  Version 1.0.0           
       Component:  Build/Install                    |       Version:  HEAD                    
      Resolution:                                   |      Keywords:  casting pointer function
Platform_version:  Ubuntu 6.06                      |      Platform:  Debian                  
        Must_fix:  No                               |   Status_info:  0                       
----------------------------------------------------+-----------------------
Comment (by mloskot):

 Folks, as I see dlsym is used indirectly but through QLibrary::resolve.
 The http://doc.trolltech.com/4.0/qlibrary.html#resolve Qt documentation]
 says:

  ''The symbol must be exported as a C function from the library.''

 Does it happen in QGIS? In fact, it would solve the problem I've reported
 here.

 Union trick, memcpy and other hacks do not, as
 [http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.8
 C++ FAQ] says: ''It's illegal, period.''

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/234#comment:13>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list