Advertisement Jump to content
Sign in to follow this  
4mad3u5

Opengl standard libraries

This topic is 1755 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

 

Regardless, the typical usage of headers are:

1. #include some headers

2. Include some objects, or a collection of objects (archives/libraries) to the linking process

3. Success

 

 

 

Is this true? Because standard header file in c, c++, or java give prototypes and define constants for functions that are going to be used and have nothing to do with the linking process. 

Share this post


Link to post
Share on other sites

I am just learning opengl but I thought freeglut was also a library? What is glew, gl, glu I thought these were all libraries as well? And I don't know what these are for.  

Edited by 4mad3u5

Share this post


Link to post
Share on other sites


Is this true? Because standard header file in c, c++, or java give prototypes and define constants for functions that are going to be used and have nothing to do with the linking process. 


Kaptein is describing the entire compile/link process. The OpenGL headers are C headers. You are correct that they declare prototypes and constants (you're wrong about Java, though, as there are no headers or prototypes there, but I won't expound on that) and are not directly involved in the link step. But, when you call a prototyped function, the linker expects the implementation of that function to be in an object file or library somewhere. If it can't find the implementation, you will get linker errors. So the header files do have an impact on the link step in that regard.

 

 

 

@4mad3u5: From what I've gathered from here and from your other threads, your understanding of the C/C++ compilation process is flawed. @Aldacron summarized the linking part really well; for a detailed explanation, read chapters 1, 2, 3, 4, 9, and 11 of An Introduction to GCC.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!