Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6848077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:49:25+00:00 2026-05-27T00:49:25+00:00

I have the following files in this directory: ~/test/lib/liblost.dylib ~/test/include/lost.h I am trying to

  • 0

I have the following files in this directory:

~/test/lib/liblost.dylib
~/test/include/lost.h

I am trying to let my rubygem determine if the above library exists by doing the following in irb:

ruby-1.9.2-p290 :008 > dir_config('','~/test')
 => ["~/test/include", "~/test/lib"] 
ruby-1.9.2-p290 :009 > have_library('lost')
checking for main() in -llost... no
 => false 

Can someone please explain why this isn’t working?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:49:25+00:00Added an answer on May 27, 2026 at 12:49 am

    This looks like it’s due to using ~ to specify the home directory. The shell only expands ~ to the path of your home directory if it is the first character of a word. When mkmf constructs the command line to call the compiler to check for the existence of the library it specifies the directory to call using the -L option, and it ends up looking like -L~/test/lib, and so isn’t expanded. You should be able to see this in the mkmf.log file.

    The fix is to avoid the ~ character in the directory path, or ensure it gets expanded before it gets used in the call to the compiler.

    You could do this by changing dir_config('','~/test') to:

    dir_config('', File.expand_path('~/test'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following three files in the same directory: citysim.cpp #include utils.h using
If I have the following files, I get this error (c2593 in VC9). If
I have the following Model and Controller files, and when i visit this url,
I have a project in which i have the following files main.wxs - directory
I have NUnit installed at this directory. C:\Program Files\NUnit 2.5.5\bin\net-2.0 I made the directory
I am trying to include the following headers: #include <libs/serialization/example/portable_binary_iarchive.hpp> #include <libs/serialization/example/portable_binary_oarchive.hpp> These files
I have development related directory src/main/resources/certs/test which is needed for one external library. This
I have a project laid out this way: lib/ bar.js curl.js src/ foo.js test/
I have the following code: if (include_once(dirname(__FILE__).'/file.php') || include_once(dirname(__FILE__).'/local/file.php') ) { This causes an
gcc 4.1.2 c99 I have the following enum's in this file ccsmd.h : enum

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.