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 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

Is there a managed API to compile C# applications (to memory or disk)? I
I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this?
Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it
I've managed to mostly ignore all this multi-byte character stuff, but now I need
I have a C++ assembly with both managed and umanaged code compiled to a
I managed to create a class using CodeDom and add a single method to
If I have managed to locate and verify the existence of a file using
Do you know managed tools for manipulating PowerPoint files? The tool should be 100%
I'm using managed c++ to implement a method that returns a string. I declare
I've somehow managed to get an SVN repository into a bad state. I've moved

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.