Menu

Can't compile

Bob B.
2021-05-20
2022-11-23
  • Bob B.

    Bob B. - 2021-05-20

    I'm trying to compile Rayshade from this repo as I failed to compile the one from Stanford, but it's giving me all sorts of errors:

    fogdeck.c : 'HUGE' undefined
    lex.o: multiple definition of 'yyin'
    lex.o: multiple definition of 'yyout'
    lex.o: multiple definition of 'yylineno'

    How do I fix these errors?

     
  • John D. Hendrickson

    FIXED.

    Thank you.

    HUGE was undefined but compiled without complaint on both iMac-2013 and GNU Linux. Never noticed it. (i hope gcc doesn't define it, glibc does not). For the time being it is EPSILON until I know a exactly the value which would cause (NaN).

    You are right: in GNU Linux using gcc-10.2.0 multiple definitions error are thrown but NOT IN gcc-4.7.4. You should know that this is due to UBUNTU changing -fno-common -fcommon defaults not due to source code. It is an RH+UBUNTU or your error in not setting up libc /usr/include options to compile code of the period. (while I don't like it, having multiple of every compiler on hand is the "plan" of RH+UBU). It now compiles on both.

     

    Last edit: John D. Hendrickson 2022-10-30
  • Bob B.

    Bob B. - 2022-11-02

    Now it's compiling fine, thanks.

    Most of the example files aren't rendering though:

    • aquarium.ray
    • buckyball.ray
    • sub.ray
    • tou.ray
    • everything in the `IRISA' folder
     
  • John D. Hendrickson

    Those examples from the old FTP site I cannot say if they all should work. I can say in the "ftp-web" tarball there is a directory with the "web page" version of documentation which is nice to read in addition to the pdf. It is no longer online anywhere.

    buckyball.ray works if you edit line 2 "sample" to "samples".

    For aquarium.ray I hadn't got to work when I tried a few years ago. For fun I tried it today. If "fish" named object and another line commented out it works (seeing file after cpp -P). Turns out: edit original aquarium.ray and change "stripe" to "striped". Now it will work. Converted from rle to jpg viewed in xli, looks good. Probably a conflict with a built-in name - I am not sure didn't check.

    There was a change from "version 1" to "version 2" for .ray syntax. program "rsconvert" corrects. I cannot say if that would revive the fish or not.

    You can look at ray4mm.tar.gz (for Mathematica) which has a ~/rayshade/extra which has RSDEFS setup. (RSDEFS defines many extras like 3D TEXT and has a couple nice examples). defs.rh needs to be edited #define RSDEFS ~/rayshade/extra or it will get an error.

     

    Last edit: John D. Hendrickson 2022-11-23

Anonymous
Anonymous

Add attachments
Cancel