Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8917537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:30:43+00:00 2026-06-15T05:30:43+00:00

I’m making a FLTK GUI in QtCreator. Please don’t get angry at me for

  • 0

I’m making a FLTK GUI in QtCreator. Please don’t get angry at me for not using Qt to make my GUI, it’s irrelevant.

Anyway, my project type is “Plain C++ Project”, and this is my code (You probably don’t need to read it, but I put it there just in case):

// include headers
#include <Windows.h>
#include <Fl/Fl.H>
#include <FL/FL_Window.h>
#include <FL/Fl_Button.h>
#include <FL/FL_ask.h>
// macro functions
#define UP(x) UNREFERENCED_PARAMETER(x)
// callback function
void callback(Fl_Widget *sender)
{
    sender->label("Thanks!");
}
// main function
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, 
    int nShowCmd)
{
    // UP's
    UP(hInstance);
    UP(hPrevInstance);
    UP(lpCmdLine);
    UP(nShowCmd);
    // window
    Fl_Window *window = new Fl_Window(250, 250, "Derp Window");
    window->begin();
    // button
    Fl_Button *button = new Fl_Button(10, 100, 230, 25, "Click Me!");
    button->callback(callback);
    // run
    window->end();
    window->show();
    int result = Fl::run();
    // delete ptr's
    delete button;
    delete window;
    // return
    return result;
}

When I run this, I get this warning, and two errors (Sorry about the small image, just zoom in your browser if you can’t read it):

enter image description here

I know what a LNK2019 error is, in fact they are probably the bane of my existence. But in this case I have no idea why I am getting this. I think that you should also look at this, it’s the text for my Qt projects .pro file:

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

win32: LIBS += -luser32 -lshell32 -lgdi32 -lole32 -ladvapi32

SOURCES += main.cpp

unix|win32: LIBS += -L$$PWD/../../../Desktop/C++/FLTK/lib/ -lfltk

INCLUDEPATH += $$PWD/../../../Desktop/C++/FLTK/include
DEPENDPATH += $$PWD/../../../Desktop/C++/FLTK/include

This is probably the most important part: I never get any errors, and the program runs fine when I use int main() as my main function.

So, my question is why am I getting this, how do I fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:30:49+00:00Added an answer on June 15, 2026 at 5:30 am

    I fixed it by making an “Empty Qt Project” instead of a “C++ Console Application”!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I need a function that will clean a strings' special characters. I do NOT
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.