Hi everyone!
in my current prizm add-in project I had to use Sine and Cosine. At first, I couldn't find them anywhere, because I had only installed the standard PrizmSDK v0.3. I scanned through the prizm wiki and found out that the libfxcg files included in v0.3 aren't up to date. I downloaded the latest ones from http://jenkins.taricorp.net/job/libfxcg/lastSuccessful/archive/ and pasted them into the lib and include folders of my SDK (On http://prizm.cemetech.net/index.php/Development_Methods_and_Tools it says it is as easy as that to update the libfxcg). I included the math.h file in my sourcecode, but the compiler still gives me these errors:
Code:
(after i had "updated" the libfxcg, the "undefined reference to '_malloc'" errors appeared as well)
My code looks like this:
Code:
PI is a float I defined myself, posX and posY are normal floats.
I think I did the updating wrong, so how would I do it properly? Any help is appreciated!
PS: I'm using windows.
PPS: I'm pretty new to C, so I'm sorry if this is a dumb question.
Edit: I only pasted the math.h file into my lib folder and not the other headers from Tari's jenkins page, but I don't think this is a problem, is it?
in my current prizm add-in project I had to use Sine and Cosine. At first, I couldn't find them anywhere, because I had only installed the standard PrizmSDK v0.3. I scanned through the prizm wiki and found out that the libfxcg files included in v0.3 aren't up to date. I downloaded the latest ones from http://jenkins.taricorp.net/job/libfxcg/lastSuccessful/archive/ and pasted them into the lib and include folders of my SDK (On http://prizm.cemetech.net/index.php/Development_Methods_and_Tools it says it is as easy as that to update the libfxcg). I included the math.h file in my sourcecode, but the compiler still gives me these errors:
Code:
Lindenmayer.o: In function `_genLindString':
Lindenmayer.c:(.text+0x1c0): undefined reference to `_malloc'
Lindenmayer.o: In function `_genPArrFrLArr':
Lindenmayer.c:(.text+0x3ac): undefined reference to `_malloc'
Lindenmayer.c:(.text+0x3cc): undefined reference to `_sin'
Lindenmayer.c:(.text+0x3d8): undefined reference to `_cos'
collect2: ld returned 1 exit status
make[1]: *** [C:/Users/Simon/Bibliotheken/Dokumente/Programmierung/PrizmSDK-0.3/projects/Lindenmayer/Lindenmayer.bin] Error 1
make: *** [build] Error 2
(after i had "updated" the libfxcg, the "undefined reference to '_malloc'" errors appeared as well)
My code looks like this:
Code:
posX += (double) sin((double) (facing * PI / 180));
posY += (double) cos((double) (facing * PI / 180));
PI is a float I defined myself, posX and posY are normal floats.
I think I did the updating wrong, so how would I do it properly? Any help is appreciated!
PS: I'm using windows.
PPS: I'm pretty new to C, so I'm sorry if this is a dumb question.
Edit: I only pasted the math.h file into my lib folder and not the other headers from Tari's jenkins page, but I don't think this is a problem, is it?