including libs by #pragma comment -> order of libs

Discussion in 'C Programming' started by Christoph, Sep 17, 2003.

  1. Christoph

    Christoph Guest

    I am including a lib in my c-source by using #pragma comment( lib,
    myLib.lib )
    -> it works!

    I additionally want to set myLib.lib as my first library. Can anybody
    help me to set the order of the librarys?

    Thanks a lot,
    Christoph
    Christoph, Sep 17, 2003
    #1
    1. Advertising

  2. On 17 Sep 2003 03:19:45 -0700
    (Christoph) wrote:
    > I am including a lib in my c-source by using #pragma comment( lib,
    > myLib.lib )


    Not using standard C you didn't. The standard says that the effects of a pragma
    directive is implementation dependant. Therefore this can't be discussed here
    without losing a certain... degree of topicality.

    You could best ask in one of the compiler newsgroups.

    --
    char*x(c,k,s)char*k,*s;{if(!k)return*s-36?x(0,0,s+1):s;if(s)if(*s)c=10+(c?(x(
    c,k,0),x(c,k+=*s-c,s+1),*k):(x(*s,k,s+1),0));else c=10;printf(&x(~0,0,k)[c-~-
    c+"1"[~c<-c]],c);}main(){x(0,"^[kXc6]dn_eaoh$%c","-34*1'.+(,03#;+,)/'///*");}
    Pieter Droogendijk, Sep 17, 2003
    #2
    1. Advertising

  3. Christoph

    Richard Bos Guest

    (Christoph) wrote:

    > I am including a lib in my c-source


    This does not make sense.

    > by using #pragma comment( lib, myLib.lib )


    This, like almost all #pragmas, is completely system-dependent.

    > -> it works!


    This sounds like accident.

    > I additionally want to set myLib.lib as my first library.


    This, again, is completely system-specific.

    > Can anybody help me to set the order of the librarys?


    Yes: the manual that came with your compiler. Failing that, a newsgroup
    that has managing your specific compiler as its topic, instead of
    comp.lang.c, which discusses ISO C.

    Richard
    Richard Bos, Sep 17, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alec S.
    Replies:
    10
    Views:
    10,095
    Alec S.
    Apr 16, 2005
  2. joe
    Replies:
    1
    Views:
    1,835
  3. Raman
    Replies:
    5
    Views:
    1,023
    Raman
    May 9, 2008
  4. George2

    #pragma comment lib

    George2, Apr 13, 2008, in forum: C Programming
    Replies:
    0
    Views:
    467
    George2
    Apr 13, 2008
  5. Greg Hauptmann
    Replies:
    4
    Views:
    191
    Stefano Crocco
    Feb 7, 2009
Loading...

Share This Page