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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:49:44+00:00 2026-05-27T02:49:44+00:00

At first: I am not using an already compiled library. Here’s the situation: I’ve

  • 0

At first: I am not using an already compiled library.

Here’s the situation: I’ve got a C++ project in eclipse CDT that has a folder structure like this:

project
  somefoldername
    src
    include
  library
    src
    include

somefoldername/src and library/src are defined as source folders and somefoldername/include as well as library/include are defined as include folders (under C/C++ General->Paths and Symbols, which also affects the compilers -I option).

The “library” folder contains the source code of a library used by my own code (which can be found in “somefolder”). Well, compiling of the whole project works fine, but linking crashes with a whole bunch of “undefined reference” errors in the library’s source.

The undefined reference errors occur, although *.o-files are created in which the missing functions should be found – and also are passed to the linker afterwards.

What am I doing wrong?

Edit: Updated to current configuration and the attempts to solve the problem.

Edit2: The accepted answer helped me out a bit, but the biggest problem seemed to be the “linking everything at once”-policy followed by eclipse. I went to autoconf and built the library first, before linking it to the main application. Although it’s more work, it’s a cleaner approach.

  • 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-27T02:49:45+00:00Added an answer on May 27, 2026 at 2:49 am

    Three possibilities:

    1) The “undefined” symbols aren’t actually in your library

     This is unlikely, but you can verify using the "nm" Linux command
    

    2) You aren’t setting the library search path (“dash-big-L”) correctly in Eclipse

    • link static lib in eclipse cdt

      … or …

      3) Perhaps you built the library with “C” linkage, but your program is using C++ linkage (or vice versa). If you’re using the “C” (gcc”) compiler, or have any “*.c” source files, then make sure all functions have prototypes in your .h header, and all prototypes use “extern “C”” as appropriate:

      & http://msdn.microsoft.com/en-us/library/0603949d%28v=vs.80%29.aspx

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

Sidebar

Related Questions

I have a class library that I created using the Class Library project template.
I have a problem with selecting not first selector using attributeContains jQuery('div[id*=abc]:not(:first)').hide();
strtok wont work correctly when using char *str as the first parameter (not the
NOTE: I am not set on using VI, it is just the first thing
I'm using BackgroundWorker for the first time, and use is not entirely clear. Can
As a developer using DB2 for the first time, I'm not familiar with what
I've recently started using an IoC container for the first time, but I'm not
I have a stored procedure that returns two int Values. The first can not
I am trying to implement a test project using the Point Cloud Library and
My python project has a C++ component which is compiled and distributed as a

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.