generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Adding #include files

Previous Thread :: Next Thread 
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
11 Sep 2011 11:52 AM
I posted this in OT, but someone there said I should "go to a forum with a community that has a higher IQ than a cucumber"
So I posted in Sh, but they told me I wouldn't get help there.
So I came here..

Does anyone know how to add "#include" files? I am in Microsoft Visual C++ 2010 and I am trying to add "#include 'GL/glut.h'(Roblox won't let me put the "<"s)".. I downloaded it off of a website, but I don't know where to put it so the Visual C++ will find it..

If you have no idea what you are talking about, please don't post.
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
11 Sep 2011 11:56 AM
Find where your other source files are and put the GL folder there.
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
11 Sep 2011 11:57 AM
You've got two options: download them and save them into the project and use it specifically for that, or if you're going to be using it in multiple projects, you would add it to "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include". If the Program Files (x86) folder doesn't exist for you, then it's in the Program Files folder.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
11 Sep 2011 11:59 AM
Erm.. Why don't you just create a new cpp file, a new header file, put the header of the library in the header file, put the source of the library in the cpp file and include the header file?

Anyways.. why don't you just use the standard libraries? They're enough...

Btw, it is in C or in C++?
Report Abuse
ThisIsSPORE is not online. ThisIsSPORE
Joined: 24 Jun 2011
Total Posts: 2402
11 Sep 2011 11:59 AM
Get Code::Blocks plz
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
11 Sep 2011 12:00 PM
C::B sucks
Report Abuse
R4P18 is not online. R4P18
Joined: 16 Nov 2008
Total Posts: 4025
11 Sep 2011 12:00 PM
To add #include files, you have them at the top, or atleast in C you do. Like so:

#include {stdio.h}
#include {string.h}
#include {stdlib.h}
char var[20];
void main(void) {
strcpy(var,"Hi there");
printf("The message is '%s'.",var);
}

(Not sure if the code I wrote would work, I am still learning C. Also, that is C code, if you are in C++ it would be about the same layout, but I do not know C++ so cannot give any examples.
Report Abuse
ThisIsSPORE is not online. ThisIsSPORE
Joined: 24 Jun 2011
Total Posts: 2402
11 Sep 2011 12:01 PM
@local

that's why more people have downloaded it over your crap

so for now

"GET DAT CRAP OUTTA HERE"
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
11 Sep 2011 12:01 PM
nvm, it's in C++.

Well, just create a new .cpp file and a new .h file, name them the name of the library and put the stuff in them and then include them, OR put them in the /include directory of Visual C++.

Anyways, I dislike Visual Studio.
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
11 Sep 2011 12:01 PM
It doesn't work for me. Troal.
Report Abuse
ThisIsSPORE is not online. ThisIsSPORE
Joined: 24 Jun 2011
Total Posts: 2402
11 Sep 2011 12:02 PM
@loc

probably because you've never handled something advanced in your life

HAHAHA I SAID IT
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
11 Sep 2011 12:03 PM
gobwey.
Report Abuse
ThisIsSPORE is not online. ThisIsSPORE
Joined: 24 Jun 2011
Total Posts: 2402
11 Sep 2011 12:03 PM
@local

{{ ~Expected brain, got null~ }}
Report Abuse
XlegoX is not online. XlegoX
Joined: 16 Jun 2008
Total Posts: 14955
11 Sep 2011 12:27 PM
"Anyways.. why don't you just use the standard libraries? They're enough..."

Wat? The C++ standard libraries don't really do anything other than provide containers. If you want to do anything non-trivial (stuff other than doing simple line-IO from the console, and reading/writing files) you need some sort of library.

To answer the question: Just search the whole file-system for some header file like "windows.h", that will find the place where the headers are for you, and you can place the GL folder/files there. You'll also need to find the library path, which you can do by searching for .lib files, and the only ones will likely be in MSVC's library directory.

Failing that you can always put them in your documents or wherever and add that as an include/library path in your project's settings.
Report Abuse
ThisIsSPORE is not online. ThisIsSPORE
Joined: 24 Jun 2011
Total Posts: 2402
11 Sep 2011 12:27 PM
@xLEGOx

lol you have a typo right in the beginning

"Wat?"
"What?"
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
11 Sep 2011 12:32 PM
@xLEGOx

If you want to make only console applications, the libraries that you don't need to download are all you need. Well, usually, at least. And actually, by standard libraries, I meant all the libraries available by default with most IDEs.

However, as soon as you need to make GUI applications, you will need other libraries. It IS possible to make GUI applications with no more than the stuff provided by the OS, but it will need to be edited for every OS and is just a pain.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
11 Sep 2011 12:34 PM
"@xLEGOx

lol you have a typo right in the beginning

"Wat?"
"What?""

He already explained that he does not care about grammar more than is needed for forum posts. Since his post is only going to be viewed a certain ammount of times, there is no need to verify the whole post for mistakes 50 times.
Report Abuse
ahhyeaehhmaybeohhno is not online. ahhyeaehhmaybeohhno
Joined: 09 Aug 2011
Total Posts: 574
11 Sep 2011 12:35 PM
@Julien

can u tl;dr dat 4 me

while i wait can u make me a sammich
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
11 Sep 2011 12:45 PM
Make them string literals instead of brackets.

#include "YourLib.h"



~ pwnedu46 ~
Report Abuse
obedientyankees96 is not online. obedientyankees96
Joined: 17 Jul 2010
Total Posts: 2023
11 Sep 2011 12:59 PM
Hmm.. I added the file to the include folder but it isn't working..
The five I downloaded are:
GL
GLAux
GLU
glui
glut

Do I need one that is called "GL/glut.h" exactly?


The next sentence is true. The previous sentence is false.
Report Abuse
XlegoX is not online. XlegoX
Joined: 16 Jun 2008
Total Posts: 14955
11 Sep 2011 02:05 PM
"If you want to make only console applications, the libraries that you don't need to download are all you need. Well, usually, at least. And actually, by standard libraries, I meant all the libraries available by default with most IDEs."

Even if you're making a Console application you'll often need a lot more than what's in the standard library, such as more complex threading, using operating system objects other than data-files, doing more with files than simply reading/writing them (EG: doing stuff with file attributes, folders, and symbolic links). Not to mention if you want to use colored output (On Linux pretty much all console tools have syntax-highlighted output), or something which does non-line IO.

And the stuff "included with most IDEs" is meaningless, every IDE have completely different extras that come with it besides the C/C++ standard libraries.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
11 Sep 2011 02:47 PM
@xLEGOx

You're right, what I said is completely unclear..=/

Actually, I also meant the stuff provided by the OS, not only the "libraries that you don't need to download". =/
Report Abuse
GoldenUrg is not online. GoldenUrg
Joined: 23 Aug 2009
Total Posts: 6428
11 Sep 2011 03:22 PM
Note you can type < > as long as you put spaces around them.

#include < stdio.h >
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image