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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:21:20+00:00 2026-06-13T03:21:20+00:00

For a client I am attempting to recreate a command line based build tool

  • 0

For a client I am attempting to recreate a command line based build tool in the Visual Studio 2010 IDE. The compilation of the libs from projects including the C/C++ source files I have nailed, the link command line is giving me grief because the executable only links correctly if the libs are given in precisely the same order as the command line tool.

The command line is something like this:

link.exe -subsystem:console -machine:I386 -verbose:lib 
-nodefaultlib:libc.lib -nodefaultlib:libcd.lib -nodefaultlib:libcmt.lib -nodefaultlib:libcmtd.lib 
-DEBUG 
-out:myout.exe 
-pdb:myout.pdb 
-libpath:../../path/to/libs
libcmtd.lib kernel32.lib user32.lib ws2_32.lib netapi32.lib comctl32.lib gdi32.lib comdlg32.lib advapi32.lib winmm.lib imagehlp.lib shell32.lib  
x_mylib.lib a_mylib.lib y_mylib3.lib z_my.lib  etc....

If the .libs the IDE compiles are linked with this command line then the .exe is correct, however I cannot get the IDE to link with precisely this .lib order – it insists on sorting all the libs alphabetically and linking.

Any ideas anyone?
avoiding the temptation to wander off into philosphical debates about the sense of this all, I can’t change the command line based build tool

  • 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-13T03:21:21+00:00Added an answer on June 13, 2026 at 3:21 am

    So, after much fiddling an answer as such…

    As described above there are projects in the solution that link to their corresponding static libs:

    a_mylib.vcxproj
    b_mylib.vcxproj
    ...
    x_mylib.vcxproj
    y_mylib.vcxproj
    z_mylib.vcxproj

    Adding another static library project my_libs.vcxproj which has no source files but contains all the above as dependencies makes the whole source code easy to build. Finally the executable my_exe.vcxproj is added which contains only my_libs as a dependency and all the ?_mylib.libs as specific linker input in the order required.

    Easy when you know how.

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

Sidebar

Related Questions

When attempting to compile mpd with Sun Studio compiler: client.c, line 438: warning: implicit
I am attempting to upload multiple files from a Silverlight client directly to Amazon
I am attempting to build a client/server game architecture and would like to begin
I'm attempting to perform a synchronous write/read in a demux-based client application with MINA
I'm attempting to install a driver on a client machine based on which version
I'm attempting to talk an Arduino with an ethernet shield from a Python client.
I am attempting to send player information from my Game to my network client
I'm attempting to fulfill a rather difficult reporting request from a client, and I
I am attempting to consume a WCF web service from a Java client using
I am attempting to develop a service that contains numerous client and server sockets

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.