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. function definition is not allowed here - how to debug?
Forum Updated to NodeBB v4.3 + New Features

function definition is not allowed here - how to debug?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 329 Views 1 Watching
  • 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
    Anonymous_Banned275
    wrote on last edited by
    #1

    This is self inflicted error...

    Easy to fix when SINGLE line of code is placed in wrong place.. no issue there.

    Any suggestion how to find the offering line when it is NOT a single line causing the error ?

    As usual - the error code is causing multitude of errors.

    /mnt/A_BT_DEC10/BT__PROGRAMS/A_JAN11/A_BT_LIBRARY/terminal_Bluetooth/mainwindow_Bluetooth_copy.cpp:607: error: function definition is not allowed here
    
    Christian EhrlicherC 1 Reply Last reply
    0
    • A Anonymous_Banned275

      This is self inflicted error...

      Easy to fix when SINGLE line of code is placed in wrong place.. no issue there.

      Any suggestion how to find the offering line when it is NOT a single line causing the error ?

      As usual - the error code is causing multitude of errors.

      /mnt/A_BT_DEC10/BT__PROGRAMS/A_JAN11/A_BT_LIBRARY/terminal_Bluetooth/mainwindow_Bluetooth_copy.cpp:607: error: function definition is not allowed here
      
      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AnneRanch said in function definition is not allowed here - how to debug?:

      Any suggestion how to find the offering line when it is NOT a single line causing the error ?

      mainwindow_Bluetooth_copy.cpp:607

      As you can see the compiler tells you where the error is.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      A 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @AnneRanch said in function definition is not allowed here - how to debug?:

        Any suggestion how to find the offering line when it is NOT a single line causing the error ?

        mainwindow_Bluetooth_copy.cpp:607

        As you can see the compiler tells you where the error is.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by Anonymous_Banned275
        #3

        @Christian-Ehrlicher Sorry , the error was "missing terminating #endif " . The compiler actually asked to remove more of them...
        Found by following "greyed out area" of known good / working code until I found the opening #ifdef...

        PS
        If you (carefully) read the referenced post you may find I did follow up on silly reply " ...missing } ".
        Contrary to somebody else opinion , it is my choice to reply or not...

        1 Reply Last reply
        0

        • Login

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