[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] dllimport undefined symbol

From: Doug Currie
Subject: Re: [Tinycc-devel] dllimport undefined symbol
Date: Wed, 19 Apr 2006 22:55:14 -0400

Hi Doub.,

> I'm using lua-tcc, which is a lua binding for tcclib, and I have a
> problem with relocation. When using libc functions, relocation is ok
> and execution works from inside lua. But when I'm linking to a dll
> import library generated with gcc, I have an unresolved symbol error
> when I try to relocate the code.

Are you building with -DTCC_TARGET_PE ?

I have a lua_tcc.dll and lua.exe with lua51.dll
Directions to build are on the list at

Lua 5.1  Copyright (C) 1994-2006 Lua.org, PUC-Rio
LuaJIT 1.1.0  Copyright (C) 2005-2006 Mike Pall
> require "lua_tcc"
> tst = tcc.compile ([[
>>   #include "lua.h"
>>   #include "winapi/windows.h"
>> int foo(lua_State* L) {
>>         char const* str = lua_tolstring(L, 1, 0);
>>         printf("Hello World!\n");
>>         printf("- 0x%s\n", str);
>>         return 1;
>> }
>> ]], {"foo"}, {"lua51", "kernel32"})
> tst.foo"99"
Hello World!
- 0x99


Doug Currie
Londonderry, NH

reply via email to

[Prev in Thread] Current Thread [Next in Thread]