Welcome, Guest. Please login or register.

Author Topic: Problems linking my program with Lua and SAS/C  (Read 1774 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
Problems linking my program with Lua and SAS/C
« on: November 26, 2011, 12:46:05 AM »
Hi.

I want to add lua scripting to a game engine that i'm making for classic Amigas and MorphOS, but i'm having some problems linking liblua.a with SAS/C, how should be linked this type of libraries?, when i try to link my program with this library SLink says that is not a valid object file.

i'm tried to compile lua with SAS/C, but with problems also, it asks for undefined symbols like strtod, pow, floor, ... i have downloaded ixemul sdk archive with the libs and include files, but with the same problem of invalid object file.
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF
 

Offline bm07

  • Newbie
  • *
  • Join Date: Jul 2009
  • Posts: 33
    • Show only replies by bm07
Re: Problems linking my program with Lua and SAS/C
« Reply #1 on: November 26, 2011, 04:07:35 AM »
If its the .a file in the aminet archive, it's an "AR" archive file. You can probably use it with gcc or amidevcpp. I've never tried to use SAS/C with non-Amiga hunk format libraries. You could also probably recompile the source with SAS/C to produce a static library in the format that SAS/C likes.
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
Re: Problems linking my program with Lua and SAS/C
« Reply #2 on: November 26, 2011, 11:19:17 AM »
Hi bm07.

The problem is that i had tried to compile lua with SAS/C also, but also requires the libraries of ixemul that are in the same format that lua library. Maybe it's better solve the dependencies, and not use the ixemul library.

Thanks you.
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
Re: Problems linking my program with Lua and SAS/C
« Reply #3 on: November 26, 2011, 01:18:32 PM »
It seems that ixemul isn't need finally, i linked it with "sc link" instead "slink" and it searchs the libraries automaticly, but now it asks for undefined symbols _main and __ctype.

Edited:

I have found that lua requires the liblua.a, and i don't know how to make a static library with sas/c to make my own version compatible with sas/c.
« Last Edit: November 26, 2011, 02:01:53 PM by balrogsoft »
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF