CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2005
    Location
    Eden Prairie, MN
    Posts
    18

    VC++ takes forever to link

    Several months ago, VC++ started taking a really long time to link my project - I timed it at SIX MINUTES for a one-line change in a .cpp file. Before that, linking only took a few seconds. I have no idea what changed to increase the link time so drastically, but I'm really tired of wasting so much time. Could there be a setting within the VC++ IDE or a project setting that could have caused this?

    It's not Browse Info - turning that off has no impact.

  2. #2
    Join Date
    Nov 2004
    Location
    Poland
    Posts
    1,355

    Re: VC++ takes forever to link

    look for precompiled headers and incremental link

  3. #3
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: VC++ takes forever to link

    Does it compile only one CPP file?

    There may be case you change in some header file, and that header file is dependent of rest (or most) of the project.
    Also (you did not mention), if the source file you are changing is in DLL project and the Application is dependent (with one or more level), it will surely take time to compile and link!
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  4. #4
    Join Date
    Apr 2005
    Location
    Eden Prairie, MN
    Posts
    18

    Re: VC++ takes forever to link

    Thanks, turning off incremental link helped a little bit. Now I'm down to 4 1/2 minutes:
    "Linking..." 1.5 minutes
    "Creating library APPNAME.lib and object APPNAME.exp" 3 minutes

    Yes, it compiles only one .cpp file - takes about 20 seconds (not included in the times stated above). This is not a DLL project.

    How do I "look for precompiled headers"?

  5. #5
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: VC++ takes forever to link

    Quote Originally Posted by pates
    How do I "look for precompiled headers"?
    On VC 6, Project Settings->C/C++ tab, in the combo look for precompiled headers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured