duplicate symbol OpenGl xcode c++

I am following the tutorial:
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/#Shaders

I get this error:

1
2
3
4
5
duplicate symbol __Z11LoadShadersPKcS0_ in:
    /Users/bjornchinfosieeuw/Documents/Cplusplus/hand1/build/hand.build/Debug/hand.build/Objects-normal/x86_64/loadShader.o
    /Users/bjornchinfosieeuw/Documents/Cplusplus/hand1/build/hand.build/Debug/hand.build/Objects-normal/x86_64/main.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


The code it concerns is:
main.cpp:
1
2
3
#include "loadShader.cpp"
// Create and compile our GLSL program from the shaders
GLuint programID = LoadShaders( "SimpleVertexShader.vertexshader", "SimpleFragmentShader.fragmentshader" );


and loadShader.cpp:
1
2
GLuint LoadShaders(const char * vertex_file_path,const char * fragment_file_path){
//... 


How to omit the duplicate symbol LoadShaders?
don't include *.cpp files http://www.cplusplus.com/forum/general/140198/
(you'll need just the prototype to use it in main)
Topic archived. No new replies allowed.