Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


including sys/resource.h


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Kevn   Members   -  Reputation: 163

Like
0Likes
Like

Posted 19 January 2012 - 11:02 PM

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.

Sponsor:

#2 jfalstaff   Members   -  Reputation: 101

Like
1Likes
Like

Posted 20 January 2012 - 12:19 AM

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.

#3 Kevn   Members   -  Reputation: 163

Like
0Likes
Like

Posted 20 January 2012 - 01:03 AM

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.

#4 fastcall22   Crossbones+   -  Reputation: 5419

Like
1Likes
Like

Posted 20 January 2012 - 01:57 AM

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) ...
QWxsIHRvYXN0LXRvYXN0aW5nIHRvYXN0ZXJzIGNhbiB0b2FzdCB0b2FzdGVkIHRvYXN0LCBhbHRob3Vn aCByZS10b2FzdGluZyB0b2FzdGVkIHRvYXN0IGlzIGdlbmVyYWxseSBub3QgcmVjb21tZW5kZWQgYnkg dGhlIG1hbnVmYWN0dXJlcnMgb2YgdG9hc3QtdG9hc3RpbmcgdG9hc3RlcnMuLi4=

#5 Kevn   Members   -  Reputation: 163

Like
0Likes
Like

Posted 20 January 2012 - 11:32 AM

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.

#6 SimonForsman   Crossbones+   -  Reputation: 6795

Like
1Likes
Like

Posted 20 January 2012 - 03:17 PM

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)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#7 jfalstaff   Members   -  Reputation: 101

Like
1Likes
Like

Posted 20 January 2012 - 09:40 PM


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)


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.

#8 Kevn   Members   -  Reputation: 163

Like
0Likes
Like

Posted 22 January 2012 - 03:15 PM

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++ :(




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS