Jump to content
  • Advertisement
Sign in to follow this  
roos

uint

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

Hi, I am working on a project with a bunch of other guys on a cross-platform game... They're all using Linux to develop, but since I'm having trouble setting up my wireless USB network adapter, for the time being I'm trying to develop in Windows. However when I compile I get a bunch of errors saying that "uint" is undefined. So, does anyone know if "uint" is a standard type on some compilers like GCC? If so then I'll just add some code like this:
#ifdef _MSVC_IS_BEING_USED   (or something like that)
typedef unsigned int  uint;
#endif
Thanks, roos

Share this post


Link to post
Share on other sites
Advertisement
uint isn't a standard type according to the C or C++ standards. Someone probably forgot to include a header that had it typedef'd.

Share this post


Link to post
Share on other sites
If they forgot to include some header, wouldn't the code fail to compile for them too? (I checked out the code fresh from the CVS repository, so there's no doubt that it compiles.) Somehow, uint is defined for their compiler and I'm just a bit confused as to where it's "coming" from. My guess is that it's something specific to GCC, so I just have to add some #ifdef/#endif so it is defined for VC++ as well.

Share this post


Link to post
Share on other sites
It might be something with GCC, but I doubt it.

This is why you always run compilers in anal mode, to prevent any extensions from getting in. [wink]

It'd probably be best to just ask the other guys where uint is defined.

Share this post


Link to post
Share on other sites
Seems like you can use uint in gcc. I found this out when typedefing it in a header, and then forgot to include that header where I used it [smile]. This compiled fine on linux, but didn't work in windows, even though I used Dev-C++ which to my knowledge is also using gcc. So it seems like you can use uint with gcc on linux, which is a bit weird in my opinion. Well, just wanted you to know.

Share this post


Link to post
Share on other sites
You can also set up paths to automatically include headers in gcc. Perhaps theyve done that locally??

IE, Around here we manually hardcode a path to our MS Platform SDK so each person can put it where they want.

The acutal make file doesn't refere to its location so the compiler and linker use the personal settings.

Cheers
Chris

Share this post


Link to post
Share on other sites
Cool, thanks for the info guys... I guess I will just add a typedef to a header that all the files can include.

roos

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!