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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:44:52+00:00 2026-05-15T14:44:52+00:00

What I want to do is to create a new shared library called libxxx

  • 0

What I want to do is to create a new shared library called libxxx that links against another shared library called libzzz, this shared library has an independent “pkg-config”-like tool, let’s say it’s called “zzz-config” which gives the cflags needed by the compilation phase when using the libzzz.
What I want to do is:

  • Create configure/makefile, etc.. using autotools like automake, autoconf, etc;
  • It must use the zzz-config script cited above;
  • It must generate automatic dependencies for sources;
  • It must have a mode for building debug (with no optimization) and release (with optimizations) builds;
  • The sources are in C++;
  • It must target for a shared library;
  • It must read sources for a src directory and put compiled files in another directory

I’ve read almost all available tutorials for autotools but I was not able to figure a way to do that, if you can point some example would be very kindly.

Thank you !

  • 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-15T14:44:53+00:00Added an answer on May 15, 2026 at 2:44 pm

    My suggestion is to use CMake instead of autotools. It’s much easier to work with and it will also create platform-dependent projects to work with (i.e. Makefile-based projects, Visual Studio projects, Eclipse CDT projects, etc.).

    It will also create debug or release projects, depending on the CMAKE_BUILD_TYPE variable value.

    Creating the libxxx library is as simple as:

    add_library(libxxx SHARED ${LIBXXX_SOURCES})
    

    where LIBXXX_SOURCES is a variable that holds the sources.

    Linking the two libraries is just as easy (see target_link_libraries):

    target_link_libraries(libxxx libzzz)
    

    To get the compilation flags from the zzz-config script you would use the execute_process command like so:

    execute_process(COMMAND ./zzz-config 
                    WORKING_DIRECTORY "<your_working_directory>"
                    OUTPUT_VARIABLE ZZZ_FLAGS)
    

    Then you can set the CMAKE_C_FLAGS or the CMAKE_CXX_FLAGS variable to setup the required compilation flags.

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

Sidebar

Related Questions

I want to create a new row in my database on a table that
I'm using Visual Basic 9 (VS2008) I want to create new Tabs as and
I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with
I want to create a new object using Class::DBI. One of the fields of
I want to programmatically create a new column in an MS Access table. I've
I want to create templates for base new reports on to have common designs.
I create a TextArea in actionscript: var textArea:TextArea = new TextArea(); I want it
I want to use a temp directory that will be unique to this build.
I want create a drop shadow around the canvas component in flex. Technically speaking
I want to create a Java application bundle for Mac without using Mac. According

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.