0

When compiling a game program I keep getting an "unable to find" error directed to the Stanford Portable Library (#include gwindow). I have tried unzipping all files in pset4, searched Google and still cannot come up with a solution. Please help!

1
  • Can you show us the exact error message?
    – Air
    Sep 25 '14 at 21:01
1

It's

#include "gwindow.h"

NOT

#include gwindow

UPDATE:

two main solutions

  1. copy the Makefile of breakout to the directory where your source code file is, open it, alternate every "breakout" with the name of your program then navigate to this directory using the terminal and execute

    make
    
  2. to manually write and execute the compilation command as follows

    clang -ggdb3 -Ispl/include -O0 -std=c99 -Wall -Werror -Wno-unused-variable -o prog prog.c -Lspl/lib -lcs -lm
    

    where prog is the name of the executable and prog.c is the name of the source code file.

8
  • i checked and the "gwindow.h" is correctly stated in my program. thx Sep 25 '14 at 22:40
  • game.c:10:10: fatal error: 'gwindow.h' file not found Sep 25 '14 at 23:20
  • hope that helps account cannot seem to copy a screen shot to this comment section. Sep 25 '14 at 23:22
  • @RobertClark are you sure that the spl folder is in the same directory as your source code file? Also, are you sure that the options -Ispl/include, -Lspl/lib and -lspl are provided when compiling your source code file?
    – kzidane
    Sep 26 '14 at 2:37
  • -Ispl/include, -Lspl/lib and -lspl options are not included in the clang compiling line. i checked clang on my breakout program and they are included there. How do i get them included when compiling my practice program? thx for you help... Sep 26 '14 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .