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

The Archive Base Latest Questions

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

I have a simple C++ project that is structured as following: -A base project

  • 0

I have a simple C++ project that is structured as following:
-A base project (ie: contains main() ), and links against everything else
–A few custom libraries that are all built as static libs (ie: .a files)
—One of these static libraries uses features in a shared objective file (ie: a .so file)

So, for example, this is how the project would appear (in a a tree view) at link time, after all the initial compiling has completed:

-myApp            (the main application)
--libaudio.a      (the audio library I made)
--libnetwork.a    (the networking library I made)
--libvideo.a      (the video library I made)
--libboost.a      (boost library)

Initially, this project build just fine. I just had to make sure I had a simple line in my makefile like this:

LIBS+=audio network video

Recently, I had to change how my audio library works. I now am required to use a third-party library, and all I have is the header file (.h) and the shared object (.so) files. So the new structure at link time looks like so:

-myApp              (the main application)
--libaudio.a        (the audio library I made)
---libthirdparty.so (contains third-party audio handling functions)
--libnetwork.a      (the networking library I made)
--libvideo.a        (the video library I made)
--libboost.a        (boost library)

This, in effect, means that I have an application with a static library linked in which makes calls to an external shared object. So, I put the header file in the appropriate location so I don’t have any build errors when compiling libaudio.a, and put the libthirdparty.so file in a location where the linker searches for all my installed libraries.

At this point, I cannot get the thing to build. It just doesn’t see libthirdparty.so file, even though I know it is in a location that the linker searches by default. For some reason, wrapping my libaudio code, as in the example below (borrowed from http://www.cplusplus.com) fixes the build error:

my_C_CPP_Header.h:
#ifndef MY_C_CPP_HEADER
#define MY_C_CPP_HEADER

/*check if the compiler is of C++*/
#ifdef __cplusplus
extern "C" {
int myOtherCfunc(int arg1, int arg2); /* a C function */
}
#endif

void myCppFunction1(); /* C++ function */
void myCppFunction2(); /* C++ function */

/*check if the compiler is of C++ */
#ifdef __cplusplus
}
#endif

#endif

Now, I have a new problem though. Now that it’s building, it no longer statically links in libboost.a, and instead is crashing at startup due to libboost.so not being present. So, somehow this setup breaks how libboost is compiled in if I manage to get it to build at all.

Any suggestions are welcome. Thank you all in advance.

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

    In the end, there was a “LIBPATH=” instead of a “LIBPATH+=” statement overriding the library include paths. Resolved.

    Thank you all for your help.

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

Sidebar

Related Questions

I have a simple Scala project that runs without any problems inside Eclipse, however,
I have a very simple Setup project that copies three dlls into the GAC.
I have a really simple ASP.NET web application and a web setup project that
Im sure this will be a simple one but have a project that started
I have a URL that is like the following: http://www.example.com/client/project/subdirectory/value/ I would like like
I've started working on a little ruby project that will have sample implementations of
We have a simple project where we read data from a socket and we
I'd like to try out the D programming language. I have simple pet project
I have this simple test project just to test the IncludeExceptionDetailInFaults behavior. public class
Let's say I have two simple models project t.string :title vote t.references :project t.integer

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.