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?
Servers for Qt installer are currently down

function definition is not allowed here - how to debug?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 330 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 26 Jan 2024, 15:33 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
    
    C 1 Reply Last reply 26 Jan 2024, 15:35
    0
    • A Anonymous_Banned275
      26 Jan 2024, 15:33

      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
      
      C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 26 Jan 2024, 15:35 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 26 Jan 2024, 18:47
      1
      • C Christian Ehrlicher
        26 Jan 2024, 15:35

        @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 26 Jan 2024, 18:47 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

        1/3

        26 Jan 2024, 15:33

        • Login

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