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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:14:10+00:00 2026-05-11T20:14:10+00:00

Using: windows xp, g++ 3.4.4 with cygwin and g++ 3.4.5 with mingw. I’m compiling

  • 0

Using: windows xp, g++ 3.4.4 with cygwin and g++ 3.4.5 with mingw.

I’m compiling a simple unit test class with cppunit.

When I link using g++ 3.4.5 I get a lot of linking errors. When I link with g++ 3.4.4 I don’t get any errors and the exe links fine and runs.

I can’t seem to trace down the errors, so any thoughts?

Thanks.

EDIT: linking errors: Unreferenced function errors. Like:

 SimpleTest.cpp:(.text+0x313): undefined reference to `CppUnit::Message::Message(std::string const&, std::string const&)'

EDIT: cmd line:

g++ -I g:\projects\thirdparty\cppunit-1.12.1\include -L g:\projects\thirdparty\cppunit-1.12.1\lib -l cppunitd -o main.exe main.cpp SimpleTest.cpp

Update: Same code in Visual Studio: No error, unit test runs as expected.

  • 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-11T20:14:10+00:00Added an answer on May 11, 2026 at 8:14 pm

    Your problem is likely incorrect link line. The order of sources/object files and libraries on the link line matters. Correct link line:

    g++ -I g:\projects\thirdparty\cppunit-1.12.1\include \
        -L g:\projects\thirdparty\cppunit-1.12.1\lib \
        -o main.exe main.cpp SimpleTest.cpp -lcppunitd
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using cygwin to get unix environment on windows. I have some shell
When I'm linking .o files with the LD linker using MinGW on Windows, it
I am trying to set up an automated build system on Windows using Cygwin.
I'm new to the NDK. (using Windows). I have downloaded cygwin and the NDK.
I am using cygwin on Windows 7 . I have a directory with all
I'm trying to copy files to C:\Windows\System32 using cygwin bash. When I copy files
I'm using Eclipse on Windows to program C++ using Cygwin's toolchain. I would like
I'm attempting to install the following Haskell package on Windows using Cygwin: HaskellCuda You
Has anyone tried compiling SciPy 0.7.1 on Windows using numpy-1.3.0 that was built with
I'm using Windows XP, TortoiseGit (latest version) and Cygwin. I have git.exe installed and

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.