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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:54:38+00:00 2026-06-11T08:54:38+00:00

I have been trying to get this working for a while now and am

  • 0

I have been trying to get this working for a while now and am unable to find an answer elsewhere, here is my problem.

When I make a static library in Visual C++ any dependencies that this library uses are carried on to the executable program that I link the library to. Here is an example

Test.lib depends on
– SDL
– OpenGL

TestApp.exe links Test.lib

In Visual C++ I do not have to add the dependencies for Test.lib in my TestApp executable, they are carried over and it works great.

However when I port my code to Linux g++ (With the Code::Blocks IDE), if I make a Static Library which is .a in g++, and I make a TestApp that links the library, it gets undefined references to the dependencies.

Is g++ able to do this, and if so what am I missing to have the dependencies carried over to my executable?

As for my settings for my library I simply use the IDE’s Static Library setting.

  • 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-06-11T08:54:39+00:00Added an answer on June 11, 2026 at 8:54 am

    With Microsoft’s compiler, header files can have library dependency information in them (source files, too, but this is typically done in headers); this gets compiled into the object file, and the linker understands and applies that information. That can be handy: you don’t have to remember long, funky names, and if you compile two source files with incompatible options you may get a library name conflict that the linker will complain about. Most compilers and linkers don’t do this kind of thing, and you have to tell the linker explicitly which libraries you want to link with.

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

Sidebar

Related Questions

I have been trying to get this working for quite a while now but
I have been trying to days now to get this website completed ... however,
I have been trying to figure this out for a while now, but every
I have been trying for several hours now to get sorl-thumbnail working, but it
I have been working on JUNG2 for a while now, trying to visualize a
Okay I've been trying to figure this out for a while now. I have
I have been trying to get this one section of my UI to immediatly
I have been trying to get this to work correctly and I think I
I have been trying to get this jsfiddle to work. So far without luck.
This is crazy, I have been trying for hours to get this to work.

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.