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

  • Home
  • SEARCH
  • 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 8212911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:55:54+00:00 2026-06-07T10:55:54+00:00

So I was writing, as a small project, a stress test. Initially, to save

  • 0

So I was writing, as a small project, a stress test. Initially, to save time, I just plopped code in a header file. I decided to organise it a bit, and moved everything to a .cpp file and then wrote the header file, but VS2010 presented me with an LNK2019 that I can’t seem to fix.

FSTRESS.cpp (Didn’t include code, because I doubt it is relevant; ask if you need it)
FSTRESS.cpp

FSTRESS.h
FSTRESS.h

Main.cpp
Main.cpp

The error:

    error LNK2019: unresolved external symbol "public: static void __cdecl FSTRESS::Start(unsigned int,unsigned int,unsigned int)" (?Start@FSTRESS@@SAXIII@Z) referenced in function _main  C:\Programming\C++\FLOPS_Test\FSTRESS\FSTRESS\main.obj  FSTRESS_Mk.II

Any ideas on why this is happening? I’m a bit of a C++ noob.
Thanks for any help 🙂

  • 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-07T10:55:56+00:00Added an answer on June 7, 2026 at 10:55 am

    So, you’ve actually got two separate definitions of the x86 and FSTRESS classes, one in the header file and one in the .cpp file. You’re allowed to do that provided that the definitions are identical, but they aren’t — the one in the .cpp file has a bunch of inline code, which isn’t there in the one in the header file. (Look up “one definition rule” for more information about this.)

    What you actually want to do is this. Your header file is fine (or, at least, I don’t see anything conspicuously wrong with it). The .cpp file should (1) #include the header file, and then (2) provide definitions for the member functions, looking like this:

    static void FSTRESS::Start(unsigned aMode, unsigned aTest, unsigned aThreads) {
      // code goes here
    }
    

    (When you have a source file and a corresponding header file, the source file should always #include the header file. This helps to make sure that if there’s an inconsistency it gets caught tidily at compile time. I can’t tell whether you were already doing that because the top of FSTRESS.cpp is invisible in your screen captures. It might have been better to post the code as text :-).)

    As an aside, don’t use names that begin with an underscore. A large portion of the space of such names is “reserved”, meaning that the C++ implementation can use them internally and Bad Things can happen if your use clashes with its use. It’s best just to avoid them all, because that way you don’t have to remember what the exact rule is and neither does anyone else reading your code.

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

Sidebar

Related Questions

I'm writing small XMPP server using boost::asio and I want to unit-test my code.
I'm writing a small project time management program for myself and have run into
I'm writing a small test project in order to get my feet wet with
I'm writing a small CMS as a Rails test project (also planning to use
I'm working on a small design project, part of which involved writing out text
I am writing a small I/O library to assist with a larger (hobby) project.
I'm writing a small drag and drop feature on the project I'm working on.
I'm writing a small parser class for a personal project. The class will essentially
I'm writing a (hopefully) small project that would end up being distributed in binary
I'm doing a small project in C after quite a long time away from

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.