porting and mixing c++

Developers
Paul
2009-07-08
2013-04-22
  • Paul
    Paul
    2009-07-08

    i assume this emulator is wrote in c how can i get around these linker errors.
    i understand if noone can help me but this is my last desperate attempt.

    extern "C" around the c code doesnt help resolve the errors either

    c:/wiisxgx/source/demo.cpp:37: warning: deprecated conversion from string constant to 'char*'
    c:/wiisxgx/source/demo.cpp:37: warning: deprecated conversion from string constant to 'char*'
    c:/wiisxgx/source/demo.cpp:37: error: invalid conversion from 'long int (*)(long int)' to 'void*'
    c:/wiisxgx/source/demo.cpp:37: warning: deprecated conversion from string constant to 'char*'
    c:/wiisxgx/source/demo.cpp:37: error: invalid conversion from 'long int (*)()' to 'void*'
    c:/wiisxgx/source/demo.cpp:37: warning: deprecated conversion from string constant to 'char*'
    c:/wiisxgx/source/demo.cpp:37: error: invalid conversion from 'long int (*)()' to 'void*'
    c:/wiisxgx/source/demo.cpp:37: warning: deprecated conversion from string constant to 'char*'
    c:/wiisxgx/source/demo.cpp:37: error: invalid conversion from 'long int (*)()' to 'void*'
    c:/wiisxgx/source/demo.cpp:37: warning: deprecated conversion from string constant to 'char*'
    c:/wiisxgx/source/demo.cpp:37: error: invalid conversion from 'long int (*)(PadDataS*)' to 'void*'

    there is alot more, its actually for every plugin. that is
    //typedef long (* PADopen)(unsigned long *);

    and other plugins that are similarly typedef'd

    sorry if it sounds to vague i dont expect any answers maybe a good nudge in the right direction

     
    • Wei Mingzhi
      Wei Mingzhi
      2009-07-09

      For C++ the data types are stricter than C. You need to cast the pointers explicitly to void *.

       
    • Andrew Burton
      Andrew Burton
      2009-07-12

      How is this related to pcsx-df?