Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: internal .h linkage

  1. #1
    Intern Newbie
    Join Date
    May 2017
    Posts
    38

    internal .h linkage

    I'm experimenting with headers - I am on this centralization kick - where all .h files are in one directory, as well as bin's and libs.

    What I've tried is: linking include paths / include files that would otherwise be listed .h's in the .cpp file. You end up with nothing listed in the .cpp
    and a working program - kinda cool.

    I post to ask is this a fruitless endeavor as a regular behavior? Like I said I'm just experimenting and could be experiencing "beginners luck"..

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    420
    First, this is not related to GL at all.
    Second, this is really hard to understand what your problem is and what you want to achieve.

  3. #3
    Intern Newbie
    Join Date
    May 2017
    Posts
    38

    sorry

    Quote Originally Posted by Silence View Post
    First, this is not related to GL at all.
    Second, this is really hard to understand what your problem is and what you want to achieve.
    I am sorry this post did not meet your expectations. It popped up after discussions about openGL, in this forum, and I favored putting it out here
    rather than take it to another forum. I think my question hinted at static library programming, and I was looking to see if anyone agreed. I think its very important to lateralize skill sets. Quest: in OpenGL .h files can I link them within the IDE setting without using .h on top of the .cpp? It is related to OpenGL because for me that is where the epiphany happened.

    Thanks in advance

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2017
    Posts
    5
    In such a case, I often try to create a centralized header file, Junction.h, where I include all those headers which are required in the source files, and then I include this Junction.h only, wherever required. But this isn't a good solution anyways. It might lead to cyclic dependencies, so beware. And also, it can increase the size of your program if your compiler/linker isn't aware to remove unused stuff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •