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 908407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:42:51+00:00 2026-05-15T16:42:51+00:00

I built a (very simple) library, which I can call just fine from another

  • 0

I built a (very simple) library, which I can call just fine from another C++ program.

But it won’t work when I try to get Ruby FFI to link it. It gives FFI::NotFoundError, says it can’t find the function exported in the DLL.

Where might things have gone wrong? Do I need special treatment when I compile my DLL using g++? I am just building it with g++ -shared -o lib.dll libsrc.cpp.

I am pretty new to Ruby, but sample code for FFI is very straightforward, and I also have code which does some pretty complex things from the user32 DLL thru FFI. So I know it works.

One more thing I can think of trying is compiling my code using visual studio in hopes of making a more “compatible” DLL, but I want to stick to GCC.

  • 1 1 Answer
  • 0 Views
  • 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-15T16:42:52+00:00Added an answer on May 15, 2026 at 4:42 pm

    http://github.com/remogatto/ffi-inliner might help.

    Note that you need to make sure that you call your methods as stdcall if they are defined that way.

    http://groups.google.com/group/ruby-ffi/browse_thread/thread/e2df39cdfe96a3c7?fwc=1

    You could also post your problem to the ruby ffi google group.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've built a very simple website using PHP Includes to display the footer and
I have built a very simple blog application using Ruby on Rails. New to
I've built a very simple table that displays 4 columns and 4 rows. When
I'm working with a website built in .net, I have a very simple popup
I want to build a very simple GUI based application in linux, c++. Which
I'm trying to build a very simple proof-of-concept for the guys I work for
I'm just learning Swing, and built a sample GUI for myself as practice. Very
I have developed a very simple C++ based cocoa touch static library and a
I am trying to cross-compile a very simple program for Android that worked with
There's this web app, which relies on a sort of data access library (simple

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.