My contrib folder is in $PATSHOME/contrib. I've tried setting both the $PATSCONTRIB environment variable to both $PATSHOME, which I think the documentation said to do (it is entirely possible that I misunderstood the phrasing), and $PATSHOME/contrib, both with the same result.
The SDL2 folder is in the contrib folder. It's just cloned from the GitHub repo and copied in there. The examples that I'm trying to build are in $PATSHOME/contrib/SDL2/TEST and the actual bindings are in $PATSHOME/contrib/SDL2/CATS/SDL.cats. Here's the relevant part of the generated C file, showing that it has the correct path to the file in question in the comment. /* /usr/local/lib/ats2-postiats-0.3.13/contrib/SDL2/SATS/SDL.sats: 899(line=29, offs=1) -- 941(line=33, offs=3) */ // #include "SDL2/CATS/SDL.cats" What it looks like (to me) is that it's just not resolving properly. None of the prelude ATS files that are included before that point are throwing errors. Just that one. Manually changing the location to "contrib/SDL2/CATS/SDL.cats" allows patscc to get past the error, but I then run into similar errors with the files that it includes. I'm just not sure why it's not resolving properly. Adding contrib to the beginning is required to get it to resolve even if I set $PATSCONTRIB to $PATSHOME/contrib. Do you think it might work properly if I move $PATSCONTRIB somewhere else or is something else going on? On Tuesday, April 2, 2019 at 3:07:05 AM UTC-4, Artyom Shalkhakov wrote: > > Hi Matt, > > On Monday, April 1, 2019 at 6:53:00 PM UTC+3, Matt Chelen wrote: >> >> I'm trying to get ATS-Contrib set up and I'm concerned that I don't >> currently have it configured correctly. As per the documentation, I put the >> "contrib" folder in $PATSHOME and set $PATSCONTRIB to $PATSHOME. >> >> The issue is that I tried compiling the SDL sample programs and, while >> the ATS compiler compiles them just fine, I get errors like the following >> from the resulting C source. >> >> $ make >> "/usr/local/lib/ats2-postiats-0.3.13"/bin/patscc -I >> "/usr/local/lib/ats2-postiats-0.3.13" -I >> "/usr/local/lib/ats2-postiats-0.3.13"/ccomp/runtime -D_GNU_SOURCE -I/usr >> /include/SDL2 -D_REENTRANT -o test00 test00.dats -L >> "/usr/local/lib/ats2-postiats-0.3.13"/ccomp/atslib/lib -latslib -lSDL2 >> test00_dats.c:82:10: fatal error: SDL2/CATS/SDL.cats: No such file or >> directory >> #include "SDL2/CATS/SDL.cats" >> ^~~~~~~~~~~~~~~~~~~~ >> compilation terminated. >> make: *** [Makefile:41: test00] Error 1 >> >> The same thing happens if I set $PATSCONTRIB to $PATSHOME/contrib. Did I >> set something up incorrectly? Is this a problem with the library? Is this a >> Cygwin issue? >> > > Could you check what is in those -I directories? In particular, where are > the SDL2/CATS/SDL.cats files located, and what is your $PATSCONTRIB, does > it have an SDL2 subdirectory? > > >> Thanks in advance. >> > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/be4dd68f-82f5-4292-8b62-762a69bfcf9a%40googlegroups.com.
