Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

undefined reference to 'cexpf' #68

Closed
MBeijer opened this issue Jan 31, 2018 · 10 comments
Closed

undefined reference to 'cexpf' #68

MBeijer opened this issue Jan 31, 2018 · 10 comments

Comments

@MBeijer
Copy link

MBeijer commented Jan 31, 2018

I am currently working on a port, and I've solved everything except for this:

obj/m68k-amigaos/Release/rockbot/projectilelib.o(.text+0x4a32): undefined reference to `cexpf'
obj/m68k-amigaos/Release/rockbot/projectilelib.o(.text+0x4f08): undefined reference to `cexpf'
obj/m68k-amigaos/Release/rockbot/artificial_inteligence.o(.text+0xbc16): undefined reference to `cexpf'

I've looked everywhere in the sources for the game and in the toolchain's headers for any mention of cexpf and I can't find it anywhere. How do I solve this? All references to this on google is that it's a standard libc-feature.

@bebbo
Copy link
Owner

bebbo commented Feb 1, 2018

clib2 provides the header and lists it under : /* Unimplemented functions (so far)... */
noixemul does not provide it either...

float complex
cexpf (float complex z)
{
  float a = creal(z);
  float b = cimag(z);
  complex v = cosf(b) + I * sinf(b);
  return expf (a) * v;
}

@MBeijer
Copy link
Author

MBeijer commented Feb 1, 2018

Maybe we should start writing down common libc functions that's missing and work on adding it to libnix and/or clib2.

I'm currently only using libnix, because I get a whole bunch more errors regarding undefined reference when trying to use clib2

@bebbo
Copy link
Owner

bebbo commented Feb 1, 2018

you find most/all? functions within gcc: libgfortran\intrinsics\c99_functions.c

You 'simply' have to create one file per function and put those into a new complex folder for the math lib, add it to the Makefile and provide the matching header. :-)

@MBeijer
Copy link
Author

MBeijer commented Feb 1, 2018

I'll grab a fork of libnix and apply changes to it. Will do a pull request when I'm done. :)

How do I compile libnix seperate from the whole toolchain script?

@bebbo
Copy link
Owner

bebbo commented Feb 1, 2018

haha - good one :-) chdir and make won't do it with the wierd toolchain...

better grab the amiga-gcc - it's cloning the same projects - and there you can run make libnix over and over.

@MBeijer
Copy link
Author

MBeijer commented Feb 1, 2018

You mean this one, right? https://github.com/bebbo/gcc
EDIT:
Derp, you meant literally amiga-gcc :D

@MBeijer
Copy link
Author

MBeijer commented Feb 1, 2018

So the toolchain repo is now obsolete? Or is that still useful for all SDK stuff?

@bebbo
Copy link
Owner

bebbo commented Feb 1, 2018

right now both are working. And SDK stuff is only in the toolchain.

@MBeijer
Copy link
Author

MBeijer commented Feb 1, 2018

Alright, cool, the amiga-gcc repo feels a bit more clean and straightforward unlike the toolchain one.
Great job! :)

@bebbo
Copy link
Owner

bebbo commented Apr 8, 2018

see amiga-gcc

@bebbo bebbo closed this as completed Apr 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants