Jump to content
  • Advertisement
Sign in to follow this  
Kevn

including sys/resource.h

This topic is 2519 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

I have a programming assignment that requires me to use a timer class that was pre-made and given to me. However, I can't compile it because I get error C1083: cannot open include file: 'resource.h' : no such file or directory.

I'm using visual studio 2010 and Windows 7. The include that is in question is
#include <sys/resource.h>

From searching google, all I have been finding is talk about compiling under unix/linux. Does anyone know if I should have this header in windows or if I need to find somewhere to download it.

Share this post


Link to post
Share on other sites
Advertisement
What is the OS they use in class? Are they using UNIX/Linux to teach programming? If so, do you have telnet access to your class' computer to work over the net?

Odd, I have like a 100 copies of resource.h in the directx and Windows SDK include directories. Some of them are empty but it seems few are alike.

Resource.h usually defines the symbols used to convert an action (example, menu selection) to a number usable by the application.

Share this post


Link to post
Share on other sites
Thank you for the response.
It is a class on data structures and algorithms, so we are supose to already know how to program meaning details on compilers and everything weren't specified. We were never told a compiler or operation system to use, but I know the programs are going to be graded on a linux machine using shell scripts. I didn't realise sys/resource was used by so many different libraries, I guess i'll try emailing the teacher.

Share this post


Link to post
Share on other sites
In the operating systems course I attended, my professor used ftime (_ftime_s in MSVC) for timing functions. Perhaps you could do the same? If the professor requires you to only submit the source file (and not the timer files), then code your own timer class using whatever means you want, as long as its interface matches that of the Timer class you were given. If that were the case, then you might just as well use timeGetTime (include windows.h, link winmm.lib) ...

Share this post


Link to post
Share on other sites
Thank you, that was a good idea but I just ran into some more problems with the other files we are required to use. Nothing I was given is compiling, it turns out I am supose to be using the school computers which run on a linux environment to compile these. I'm going to give cygwin a try and if that doesn't work i'll just go in and use the school computers monday.

Share this post


Link to post
Share on other sites

Thank you, that was a good idea but I just ran into some more problems with the other files we are required to use. Nothing I was given is compiling, it turns out I am supose to be using the school computers which run on a linux environment to compile these. I'm going to give cygwin a try and if that doesn't work i'll just go in and use the school computers monday.


You should talk with your teacher/professor and see if there is ssh access to to the schools computers, that way you can work from home quite easily (At my uni we had 2 servers that we could access from home, one running Debian and one running Solaris), your university might also have a license for something like winaxe for the students to allow you to get X running at home.

Another fairly easy option is to simply download a Linux distribution and install it in for example VirtualBox (Far easier than messing with cygwin imo)

Share this post


Link to post
Share on other sites

[quote name='Kevn' timestamp='1327080729' post='4904626']
Thank you, that was a good idea but I just ran into some more problems with the other files we are required to use. Nothing I was given is compiling, it turns out I am supose to be using the school computers which run on a linux environment to compile these. I'm going to give cygwin a try and if that doesn't work i'll just go in and use the school computers monday.


You should talk with your teacher/professor and see if there is ssh access to to the schools computers, that way you can work from home quite easily (At my uni we had 2 servers that we could access from home, one running Debian and one running Solaris), your university might also have a license for something like winaxe for the students to allow you to get X running at home.

Another fairly easy option is to simply download a Linux distribution and install it in for example VirtualBox (Far easier than messing with cygwin imo)
[/quote]

To the OP: I'd go with the former first. If they give ssh access, you can get that up and running in less than an hour. Setting up a linux box, even if it's just a partition on your existing box, could take much longer and there is a risk that may or may not be higher than on a windows machine if you don't know how to lock down a linux box.

Share this post


Link to post
Share on other sites
Thanks for the advise, turns out there is ssh access. I've been using ssh access to their computers and everything is compiling fine now. Now i just need to get used to what works on linux vs what works on windows. Its like i'm relearning how to program in c++ :(

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!