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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:43:57+00:00 2026-05-15T09:43:57+00:00

I managed to compile Lua 5.1.4 for Palm webOS and now I’m trying to

  • 0

I managed to compile Lua 5.1.4 for Palm webOS and now I’m trying to write an extension to use webOS’ services from Lua. However, when I try to load my library, Lua reports:

undefined symbol: lua_pushlstring

Here’s my code:

#define LUA_LIB
#include "lua.h"
#include "lauxlib.h"

static int hellopalm(lua_State *L) {
    lua_pushliteral(L, "Hello, Palm!");
    return 1;
}

static const luaL_reg palmlib[] = {
    { "hellopalm", hellopalm },
    { NULL, NULL }
};

LUALIB_API int luaopen_palm(lua_State *L) {
    luaL_register(L, "palm", palmlib);
    return 1;
}

Here’s my Makefile:

LUADIR= ../lua-5.1.4/lua-webos
CC= arm-none-linux-gnueabi-gcc
CFLAGS= -O2 -Wall -shared -nostdlib -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp
INCLUDES= -I$(LUADIR)/include
RM= rm -f

LIBNAME= palmlib.so
SOURCES= palmlib.c

default: $(LIBNAME)

clean:
    $(RM) $(LIBNAME)

$(LIBNAME): palmlib.c
    $(CC) $(CFLAGS) $(INCLUDES) $(SOURCES) -o $@

I know lua_pushliteral is just a macro that calls lua_pushlstring, so that’s where the error is coming from. None of the push_* variants seem to work at all. I suspect something is wrong with my Makefile.

Any ideas?

  • 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-15T09:43:59+00:00Added an answer on May 15, 2026 at 9:43 am

    You need to export the Lua API symbols when you build your Lua interpreter. In Linux, the flags for gcc are -Wl,-E; perhaps this works in your platform as well.

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

Sidebar

Related Questions

I managed to compile V8 engine on the machine, however when I type $
I managed to configure Sublime Text 2 for C++ and I can now compile
I'm trying to compile a GNU stack on Solaris 10 (x86). I've managed to
I've been trying to learn more about CURL recently and finally managed to compile
I have a const int that is computed at compile time in my Managed
I'm trying to load a mixed managed application compiled and targeted for Framework 3.5
I managed to request the publish_actions permission, but since it is revocable from the
I managed to get some help from a previous question and I have the
After following instructions on the emscripten wiki I have managed to compile a small
I am trying to compile this libevent2 package to Windows, but currently I can't

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.