Include

This is a discussion on Include within the C++ Programming forums, part of the General Programming Boards category; I see this style of include alot #include <lib3ds/mesh.h> But everything I've tried makes the compiler say that lib3ds/mesh.h could ...

  1. #1
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735

    Include

    I see this style of include alot
    #include <lib3ds/mesh.h>
    But everything I've tried makes the compiler say that lib3ds/mesh.h could not be found. How do I get it to work?

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,062
    Go into your include folder of your compiler (or system, or wherever it keeps its' standard libraries), create a folder "lib3ds", put mesh.h in it.
    Sent from my iPadŽ

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,344
    > Go into your include folder of your compiler
    Don't do this - never touch the standard installation directories.

    Most compilers allow you to specify additional search directories, and you should use this to tell the compiler the root directory of where the additional includes are stored.
    Eg.
    gcc -I/path/to/include foo.c

    /path/to/include/lib3ds/mesh.h
    is where the actual file is located.

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,062
    Ah, sorry to be misunderstood.

    That was less of me telling him what you should do and more me telling him how that include could exist. Adding search directories is probably a most likely guess, though.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. debug assertion failed!
    By chintugavali in forum C Programming
    Replies: 4
    Last Post: 12-11-2007, 05:23 AM
  2. Socket programming
    By kahad in forum C Programming
    Replies: 3
    Last Post: 12-14-2006, 03:37 PM
  3. MFC include BS
    By VirtualAce in forum Windows Programming
    Replies: 4
    Last Post: 10-31-2005, 11:44 AM
  4. help with finding lowest number entered
    By volk in forum C++ Programming
    Replies: 12
    Last Post: 03-22-2003, 12:21 PM
  5. MFC Assertion Failure
    By maxthecat in forum Windows Programming
    Replies: 5
    Last Post: 08-01-2002, 09:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21