Results 1 to 2 of 2

Thread: [Resolved] Conditional code based on library version?

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Resolved [Resolved] Conditional code based on library version?

    Is it possible to check a library version and execute different code based on that version, perhaps with a preprocessor statement?

    Specifically, depending on the version of libvte, I want to execute different code. Pseudocode:

    Code:
    #if vte_version < 0.25
    vte_terminal_fork(...);
    #else
    vte_terminal_fork_full(...);
    #endif
    Last edited by The Hobo; Sep 7th, 2010 at 08:45 PM. Reason: Resolved
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Re: Conditional code based on library version?

    Figured it out, at least for vte:

    Code:
    #if VTE_CHECK_VERSION(0,25,0)
    
    #else
    
    #endif
    My evil laugh has a squeak in it.

    kristopherwilson.com

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