Jump to content
  • Advertisement
Sign in to follow this  
Bombshell93

Cygwin compiler errors left and right

This topic is 2505 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 recently switched over to NetBeans from VS 2010. For the compilers I used Cygwin, but its been doing nothing but give me compiler errors.
I've searched for 2 days straight for why I keep getting problems, I've installed every package.
Here is a chunk of the error

/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:232:5: error: template declaration of ‘const _Tp& std::min’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:235:7: error: expected primary-expression before ‘if’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:235:7: error: expected ‘}’ before ‘if’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:237:7: error: expected unqualified-id before ‘return’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:253:5: error: ‘max’ declared as an ‘inline’ variable
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:253:5: error: template declaration of ‘const _Tp& max’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:256:7: error: expected primary-expression before ‘if’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:256:7: error: expected ‘}’ before ‘if’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:258:7: error: expected unqualified-id before ‘return’
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/stl_algobase.h:259:5: error: expected declaration before ‘}’ token

I've put the whole build log on pastebin here http://pastebin.com/8v08wKpT

I've got every package installed (even the unnecessary ones) I've got it all set up, the compilers, makers, etc, etc. all set.
The project shows no warnings or errors one moment, then it starts saying it can't find reference to D3DDevice->release() and that it can't find queue and other little random stuff.
The project built fine in VS 2010. I've got all the library directories and include directories set.

Anyone have any clue what is going on?
I'd stick with VS 2010 just the intellisense never works, and half the time it doesn't find syntax errors until building.

Any and all help is appreciated,
Thanks in advanced,
Bombshell

Share this post


Link to post
Share on other sites
Advertisement
It looks like max and min have been defined as macros in some header or other? (which are then causing a f**k up with the declaration of std::min/std::max). Not sure why anyone would want to use cygwin though :|

Share this post


Link to post
Share on other sites
Yes: <windows.h> craps all over the global namespace. Try including that file at the top of your source before any other headers and you should #undef min and max rigtht afterwards.

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!