Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem Compiling In Release Mode

Problem Compiling In Release Mode

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.0k 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.
  • B Offline
    B Offline
    brandan
    wrote on last edited by
    #1

    Whenever I compile my program in debug mode it works perfectly fine, however when I compile it in Release mode I get the following errors:

    @moc_mainwindow.cpp:-1: error: undefined reference to MainWindow::lowercase(QString)' moc_mainwindow.cpp:-1: error: undefined reference to MainWindow::on_label_linkActivated(QString const&)'
    moc_mainwindow.cpp:-1: error: undefined reference to MainWindow::on_ReadButton_clicked()' :-1: error: release/moc_mainwindow.o: bad reloc address 0x4 in section .data'
    collect2.exe:-1: error: error: ld returned 1 exit status@

    The undefined error's are all pointing to functions I deleted in my program. I also "Ctrl-F"ed all of them in the moc_mainwindow.cpp and I couldn't find any of the functions. In addition usually when I double click the errors I usually get a reference showing where the error is in the code but it just says "File not found: moc_mainwindow.cpp"

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi, and welcome to the Qt Dev Net!

      To do a proper clean-up, save your files and do:

      Build -> Clean Project "XYZ"

      Build -> Run qmake

      Build -> Build Projext "XYZ"

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      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