06 September 2016, 11:09 | #1 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,640
|
GCC problems
I am trying to use LouiSe's GCC distribution (which only has OS3.1 includes) to port a 68k program from SAS/C to GCC. I have overwritten ADE/os-include/ with ndk_3.9:include/include_h/ and overwritten ADE/os-lib/ with ndk_3.9:include/linker_libs/ .
I am giving "gcc -noixemul -lamiga foo.c" to build the program. But it is giving "undefined reference" errors for all functions that don't already exist in OS3.1. I would also like to link reaction.lib, but -lreaction doesn't work, I don't know the correct syntax and there doesn't seem to be much proper documentation. :-( It compiles and links without issues on SAS/C. Thanks in advance if some GCC user can give me some advice on what could be the cause. Last edited by Minuous; 06 September 2016 at 11:14. |
06 September 2016, 13:41 | #2 |
Registered User
Join Date: Sep 2011
Location: Paris/France
Posts: 274
|
Hello
Seems your amiga.lib dont have those functions So find a better more recent amiga.lib for 68k or dont use amiga.lib and open/close your libraries yourself and add related include like #include <proto/reaction.h> |
06 September 2016, 16:24 | #3 |
Registered User
Join Date: Nov 2013
Location: Cyberia
Posts: 8
|
GCC uses a different library format. You have to use 'hunk2aout' and 'ar' to convert.
1. make a directory and copy amiga.lib to it. 2. cd into the dir and do "hunk2aout amiga.lib" 3. do "ar qc libamiga.a obj.#?" 4. do "ranlib libamiga.a" 5. copy libamiga.a to where the linker libs belong. Last edited by existentia; 07 September 2016 at 07:19. Reason: found a better answer |
08 September 2016, 16:16 | #4 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,640
|
Thanks to all, but I gave up and ended up using VBCC instead.
Last edited by Minuous; 08 September 2016 at 16:22. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
gcc .lib | mritter0 | Coders. C/C++ | 13 | 27 October 2018 02:13 |
gcc linker | mritter0 | Coders. C/C++ | 3 | 21 December 2014 16:54 |
From gcc to vbcc. | Cowcat | Coders. General | 9 | 06 June 2014 14:45 |
GCC and GCCFindHit | tygre | Coders. Language | 2 | 20 February 2012 16:45 |
StormC4/GCC | JoJo | Coders. General | 0 | 28 October 2002 09:38 |
|
|