#pragma comment lib

This is a discussion on #pragma comment lib within the Windows Programming forums, part of the Platform Specific Boards category; Hello everyone, Just want to confirm whether my understanding is correct. The statement in source file, Code: #pragma comment(lib, "DLL1.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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,587
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,587
    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, 04:50 AM
  5. ObjModLib Compiler for pragma comment.
    By sean in forum C++ Programming
    Replies: 2
    Last Post: 12-26-2001, 01:55 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21