Linking .obj file
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Linking .obj file

  1. #1
    Join Date
    Jun 2009
    Location
    oklahoma
    Posts
    199

    Linking .obj file

    I have two different versions of an .obj file... one for full version, and one for trial version.
    In stdafx.h, I have an option to declare a trial version flag, however i don't know how to pick and choose between the .obj files. I always have to manually remove one obj file and add the other.

    Is there a way to do this in the code somewhere?
    Compiler is VC++ 6.0

  2. #2
    Join Date
    Nov 2003
    Posts
    1,778

    Re: Linking .obj file

    Use LIB.EXE to create a library (.lib) for each version of the .obj files.
    http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx

    Then use #pragma comment(lib, "mylib.lib") to link against one version or the other.
    http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx

    gg

  3. #3
    Join Date
    Jun 2009
    Location
    oklahoma
    Posts
    199

    Re: Linking .obj file

    perfect! works great, thank you

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center