Compiling newLisp-8.8.0 with Borland C++ builder 2006

Started by c.ln, June 06, 2006, 04:25:55 PM

Previous topic - Next topic

c.ln

Hello Lutz !



As i try to compile the source of newLisp with Borland ( in a project ), the compiler detect one bug on the line n° 340 of nl-math.c in function:



CELL * functionFloat (CELL * params, int op)

{

...

switch (op)

{

...

case OP_ERRORFUNC: floatN = erf (floatN); break;

...



the function:

double erf (double) is undefined



The closest function name that i find is p_erf but the signature is complitely different, there is a link in file "primes.h" between erf & p_erf in the table named primitive.



In the hope that these few lines can help you,



Best Regards,

Christian



PS

I keep hope alive that one day, you introduce struct access for complex data ( records ) which permit field access without pack & unpack the buffer in several variables and without compute offset & length for the atomic datas.

Lutz

#1
Hello Christian,



erf() is a function part of the floating point functionality delivered by the GCC compiler and its libraries (glibc).



Since about a year I have abandoned support for the Borland compiler. MinGW based on GCC is easier to maintain across all OS platforms. GCC today is an industry standard.



I suggest you move to MinGW for the Win32 platform too. There are other functions besides erf() which do not work correctly or which will work differently using the Borland compiler. BCC is an excellent compiler but code portability weighs out the speed advantages it produces over GCC compiled newLISP.



Regarding struct support for library import: there would be a lot of additional code involved to deliver a more high-level library interface. It also would be a lot slower excuting imported functions. The current interface requires more system level knowledge but produces very tight, fast bindings to imported functions, as fast as built-in to newLISP.



For library imports needed more often there will always be somebody sufficiently knowledgable in 'C' and it's calling conventions to write the appropiate module/context.



What kind of functionality are you looking for? What are the functions you would like to see? Perhaps something you are looking for already exists or is easy to implement.



Lutz

HPW

#2
QuoteSince about a year I have abandoned support for the Borland compiler.


But wasn't the borland compile the only one running in .NET-apps?
Hans-Peter

Lutz

#3
It seems that those problems went away with a leter version of MinGW. I any case I haven't heard of .NET + newLISP in a long time and don't think that it needs to be of concern.



Lutz

c.ln

#4
Thanks a lot for your answers.



HPW, the Borland 2006 Studio comes with a Pascal, a C++ & a C# compilers and build executables both for Win32 & .NET ...

I use it since several years ( Turbo Pascal 1.2 :-)



The make with MinGW environment is easy, but the dbg tool against td32 or the integrated debugger in the Borland IDE is awfull. If you want to enter in the code to understand it and even to modify it, it's better to use frendly and powerfull tools.



Best regards,

Christian