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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:44:29+00:00 2026-05-31T08:44:29+00:00

I have a bizarre problem using Qt Creator that I can’t reproduce with Visual

  • 0

I have a bizarre problem using Qt Creator that I can’t reproduce with Visual Studio.
For the project I’m working with I have to use a third party dll, and to that end I need to include in the code also an appropriate header file. However, even though the header file has a set of

#ifndef VICON
#define VICON

//...

#endif  // VICON

guards, as soon as I include the header in more than one source code file (either directly or indirectly), I get following linking errors:

  1. mainwindow.obj:-1: error: LNK2005: “class std::basic_ostream > & __cdecl ViconDataStreamSDK::CPP::operator<<(class std::basic_ostream > &,class ViconDataStreamSDK::CPP::String const &)” (??6CPP@ViconDataStreamSDK@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV23@ABVString@01@@Z) already defined in main.obj

  2. debug\Beetle_01.exe:-1: error: LNK1169: one or more multiply defined symbols found

I can provide you with the source code, but that seems to be irrelevant, even if I’m not calling anything from this DLL, as soon as the related header file appears in more than one place I get above errors. No issues if the header file is only in one place, I can then call its content and everything works as expected.

Here’s how I include the dll in the .pro file, hope it’s the right way:

INCLUDEPATH += .
win32:LIBS += ViconDataStreamSDK_CPP.lib

(And relevant lib, dll, and h files are all in the current dir)
I’m coding on Windows 7, btw.

  • 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-05-31T08:44:31+00:00Added an answer on May 31, 2026 at 8:44 am

    It seems to me that the library might define the operator<< function in a header file, but forgot to mark it as static or inline. This means it will be defined in all source files including the header file, and you will get the linker error you describe.

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

Sidebar

Related Questions

I have a bizarre problem with a Visual Studio project. I'm writing a C#
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have a bizarre problem that is causing us problems. We have a simple
I have a bizarre problem that is doing my head in. I have the
I have a bizarre problem - I'm hoping someone can explain to me what
I have been using Hibernate very successfully, but today I noticed a bizarre phenomenon
I have this bizarre problem. I'm making a checklist program with XCode and I'm
Newbie alert! OK, I have a working central Mercurial repository that I've been working
I have a .NET Compact Framework app that can runs on three windows machines
I have a problem playing a sound correctly in Java using the Clip interface.

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.