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 8853233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:36:07+00:00 2026-06-14T13:36:07+00:00

I am having an unusual error when trying to compile my project in Qt

  • 0

I am having an unusual error when trying to compile my project in Qt Creator 2.4.1. It compiles out just fine until it needs to link my code and it says “Undefined refernce to ‘XXX'” Where “XXX” is a file that it compiled just fine and I wrote so I know that the functions it can’t seem to find exist. Here is an example (just in case what I just described doesn’t make sense):
undefined reference to `ESanity NSane::CSane::ArgumentCheck(int)’

Here is the code I wrote and compiled just fine:

Declaration (in class)

template<typename Type> ESanity ArgumentCheck(Type aObj);

Definition (in source)

template<typename Type>
ESanity CSane::ArgumentCheck(Type aObj)
{
    assert(aObj != NULL);

    return aObj != NULL ? ESanity_Sane : ESanity_Insane;
}

Qt Creator (I guess it is technically g++, Qt Creator is just an IDE) says that it can’t link to it’s own compiled source and it also says when I double-click the error in the error window, that the file is missing even though it opens and I can see it.

PLEASE NOTE: I am compiling on Xubuntu 12.04 LTS with Qt Creator 2.4.1 using g++ 4.6.3

  • 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-14T13:36:08+00:00Added an answer on June 14, 2026 at 1:36 pm

    It’s template code, you can’t separate definition into .cpp, you have to put all code in one file

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

Sidebar

Related Questions

Having just added a new button in my web application, I get an error
I am having a problem getting xampp to render an existing project I just
I am trying to join 3 tables but am getting some unusual results, having
Having this code I get the error: Exception in thread AWT-EventQueue-0 java.lang.NoClassDefFoundError: org/apache/axis/EngineConfiguration I
I'm having an unusual problem with an IE document with contentEditable set to true.
I was given an unusual request recently that I'm having the most difficult time
Having trouble with each function... Will try to explain by example... In my code,
Having issue with slider navigation. Works perfectly fine when there are no other unordered
I've been following performance of my website and out of all slow-executing code (>1s),
I'm having a problem with the specific set of values in this code snippet.

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.