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

  • Home
  • SEARCH
  • 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 7458577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:27:57+00:00 2026-05-29T13:27:57+00:00

I have embedded Lua on Win32 in my project by means of statically linking

  • 0

I have embedded Lua on Win32 in my project by means of statically linking it in (no, I can’t switch to DLL). I would like to bundle more Lua extensions that use native code – not just pure .lua files. Specifically, I want to bundle Steve Donovan’s winapi which comes as some lua files and some .c files.

How to do it?

  • 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-29T13:27:58+00:00Added an answer on May 29, 2026 at 1:27 pm

    You need to do two things. First, you have to compile the Lua DLL projects into non-DLL projects. Since they’re intended to be DLL modules, they probably won’t have provisions for this in their build systems. That means you have to do it yourself. Get rid of the DLL main functions and other specialized DLL functions (but take note of what they do and make sure you replicate it if it’s important). And make sure that you change any #defines that try to include Lua with dynamic linking.

    All Lua module DLLs export one or more functions of the form luaopen_*, where * is the name of the module to load. This function will likely be decorated with declspec() notation. Typically, the notation is done via a preprocessor macro, but it may not be. Either way, remove it, turning it into a normal function declaration.

    Now, once you have created your lua_State object, just call that luaopen_* function with your lua_State.

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

Sidebar

Related Questions

I have an embedded PowerPoint presentation in an Excel workbook. How can I edit
I have an embedded flash that is transparent so it looks like part of
I have embedded Lua in an Objective-C application using LuaObjCBridge. I need to know
I have lua embedded in my game engine and a directory structure of lua
I have a key => value table I'd like to sort in Lua. The
I have embedded fb's social like plugins into my blog . it will state
i try to integrate Lua in a embedded project using GCC on a Cortex-M4.
I have embedded string resources in my .NET 4.0 project: Strings.resx and Strings.de.resx. In
I have embedded an EXE as a resource in my Win32 application. I'm looking
I have embedded an online-call on a website. You can see it here right

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.