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. [Solved] Syntax Highlighter Error Qt5 Example
Forum Updated to NodeBB v4.3 + New Features

[Solved] Syntax Highlighter Error Qt5 Example

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 647 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
    bnosam
    wrote on last edited by
    #1

    When I try to bring the code from the Syntax Highlighter (exactly as is) into my own project, I get this error, no matter what I put as the argument for Highlighter::Highlighter(QTextDocument *

    The error is @mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall Highlighter::Highlighter(class QTextDocument *)" (??0Highlighter@@QAE@PAVQTextDocument@@@Z) referenced in function "public: void __thiscall MainWindow::setUpEditor(void)" (?setUpEditor@MainWindow@@QAEXXZ)@

    It's strange because the only line that I get issues with is

    @highlighter = new Highlighter(editor->document());@

    When I comment it out, it compiles fine.
    Editor is a QPlainTextEdit object

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bnosam
      wrote on last edited by
      #2

      Had to make a new project to get it to work :S

      This keeps happenign in Qt creator for some reason.

      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