# uint

This topic is 4930 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
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 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 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 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 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 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

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634135
• Total Posts
3015753
×