Polytonic / Glitter

Dead Simple OpenGL
http://polytonic.github.io/Glitter/
2.48k stars 418 forks source link

Trouble running the program #21

Closed cwahlfeldt closed 8 years ago

cwahlfeldt commented 8 years ago

Hi,

Im having an issue getting the main.cpp file to compile and run.

I am using a mac terminal for this so my steps are as follows:

1: Get the files and set up a make file

git clone --recursive https://github.com/Polytonic/Glitter
cd Glitter
cd Build
cmake ..

2: Use the make file (this runs 100% and should be generating all the dependencies)

make 

3: Attempt to compile main.cpp and run the program

cd ../Glitter/Sources
make main

And then this happens:

main.cpp:2:10: fatal error: 'glitter.hpp' file not found
#include "glitter.hpp"
         ^
1 error generated.
make: *** [main] Error 1

Just to clarify, Im working on OSX 10.11.1 & CMake Ver. 3.4.0.

Maybe Im just not doing the process correctly?

Thanks!

Polytonic commented 8 years ago

Do not perform step 3. For makefiles, you should be doing:

git clone --recursive https://github.com/Polytonic/Glitter
cd Glitter
cd Build
cmake ..
make
./Glitter/Glitter

You do not need to separately "make main"; invoking make with no arguments will build the correct executable by default.

cwahlfeldt commented 8 years ago

ahhh ok thank you so much!