Thread: #pragma comment lib

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    #pragma comment lib

    Hello everyone,


    Just want to confirm whether my understanding is correct.

    The statement in source file,

    Code:
    #pragma comment(lib, "DLL1.lib")
    has the same effect (as an alternative approach) of set DLL1.lib as implicit link library input in project link settings? So, we choose either one method to configure implicit linking input library?


    thanks in advance,
    George

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    That's what I figure since it's what the documentation says (passes a linker command to the linker).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    You mean you agree with my points in my original post?

    Quote Originally Posted by Elysia View Post
    That's what I figure since it's what the documentation says (passes a linker command to the linker).

    regards,
    George

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Yes, that's right.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    Question answered.

    Quote Originally Posted by Elysia View Post
    Yes, that's right.

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using VC6 link VC7 static lib error
    By George2 in forum C++ Programming
    Replies: 5
    Last Post: 06-29-2006, 10:58 PM
  2. Programming a PIC 16F84 microcontroller in C
    By Iahim in forum C Programming
    Replies: 1
    Last Post: 05-13-2004, 02:23 PM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  4. what is a pragma comment?
    By Shadow12345 in forum C++ Programming
    Replies: 9
    Last Post: 11-25-2002, 05:50 AM
  5. ObjModLib Compiler for pragma comment.
    By sean in forum C++ Programming
    Replies: 2
    Last Post: 12-26-2001, 02:55 PM