Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt-creator and variadic functions
QtWS25 Last Chance

Qt-creator and variadic functions

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aCOSwt
    wrote on last edited by
    #1

    Being said that I am a complete n00b in qt development and that, of course, what I do might well be completely wrong.
    (Please do tell if it is)

    I run into a problem using qt-creator-2.5.2 / qt-4.8.4 under Linux-3.6.11 and gcc-4.6.3 as soon as I add whatever variadic function into project_main_win.cpp ( and associated header ), I mean, for example something looking like :
    @void BFT_Main_Win::I_Log(int support,int criticity,char *format,...)@

    Everything (including project_main_win.cpp) build well apart from the moc file, moc_project_main_win.cpp exhibiting a typical syntax error :
    @error: expected type-specifier before '(' token@

    As a matter of fact, the moc file get a corresponding line :
    @ case 1: _t->I_Log((reinterpret_cast< int()>(_a[1])),(reinterpret_cast< int()>(_a[2])),(reinterpret_cast< char(*)>(_a[3])),(reinterpret_cast< ()>(_a[4]))); break;@
    From which it seems to appear that the cast is not correctly specified for the fourth argument, that is to say the variable list.

    What am I doing wrong ? What did I just fail to understand ? Are there any particularity I ignore about the declaration of variadic functions ?

    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved