Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML with Netbean possible linking error.  (Read 3989 times)

0 Members and 1 Guest are viewing this topic.

decoy26517

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML with Netbean possible linking error.
« on: May 09, 2012, 04:14:04 am »
Hey there

I think that my problem is a library linking issue. I'm coding in C++ in Netbeans on Windows 7. I'm also using the SFML 2.0 RC.

Here's the error report:

Code: [Select]
In file included from /cygdrive/C/******/SFML-2.0-rc/include/SFML/System.hpp:32:0,
                 from /cygdrive/C/******/SFML-2.0-rc/include/SFML/Window.hpp:32,
                 from /cygdrive/C/******/SFML-2.0-rc/include/SFML/Graphics.hpp:32,
                 from welcome.cc:1:
/cygdrive/C/******/SFML-2.0-rc/include/SFML/Config.hpp:65:6: error: #error This operating system is not supported by SFML library
In file included from /cygdrive/C/******/SFML-2.0-rc/include/SFML/Window.hpp:40:0,
                 from /cygdrive/C/Users/******/SFML-2.0-rc/include/SFML/Graphics.hpp:32,
                 from welcome.cc:1:
/cygdrive/C/******/SFML-2.0-rc/include/SFML/Window/Window.hpp:105:34: error: expected ‘)’ before ‘handle’
/cygdrive/C/******/SFML-2.0-rc/include/SFML/Window/Window.hpp:141:17: error: ‘WindowHandle’ has not been declared
/cygdrive/C/******/SFML-2.0-rc/include/SFML/Window/Window.hpp:424:5: error: ‘WindowHandle’ does not name a type
In file included from /cygdrive/C/******/SFML-2.0-rc/include/SFML/Graphics.hpp:40:0,
                 from welcome.cc:1:
/cygdrive/C/******/SFML-2.0-rc/include/SFML/Graphics/RenderWindow.hpp:93:40: error: expected ‘)’ before ‘handle’


Here's my setup:
In tools -> C/C++ -> Code Assistance ->C++ compiler I've included the \SFML-2.0-rc\include\ directory.
In Project Properties -> build -> C++ Compiler -> included directories the \SFML-2.0-rc\include\ directory is there.
In Project Properties -> build -> Linker -> Libraries I have sfml-window, sfml-system, sfml-graphics, sfml-audio, sfml-main.
 

I think that's it. Other than that it's the fresh install. Any thoughts about where I went wrong during the Setup?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML with Netbean possible linking error.
« Reply #1 on: May 09, 2012, 08:17:54 am »
Apparently, SFML is not compatible with Cygwin.
Laurent Gomila - SFML developer

decoy26517

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML with Netbean possible linking error.
« Reply #2 on: May 10, 2012, 12:23:27 am »
Apparently, SFML is not compatible with Cygwin.

What would you recommend as a substitute with Netbeans? mingw, msvc, something else?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML with Netbean possible linking error.
« Reply #3 on: May 10, 2012, 08:06:58 am »
Quote
What would you recommend as a substitute with Netbeans? mingw, msvc, something else?
Anything else.
Laurent Gomila - SFML developer

DJuego

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: SFML with Netbean possible linking error.
« Reply #4 on: May 10, 2012, 10:44:42 am »
Uh... I use MinGW(gcc 4.6.2) with Codeblocks (and VS2010) and it works marvellously! However... I have made nothing interesting... still... :-X

DJuego

Sorry for my English

decoy26517

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML with Netbean possible linking error.
« Reply #5 on: May 11, 2012, 12:47:52 am »
After spending about 2 hours trying to get MingW working with NetBeans I decided to abandon Netbeans and went to VS2010. I got it to work within 10 minutes. Thanks for the help everyone.

Aire

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML with Netbean possible linking error.
« Reply #6 on: September 17, 2012, 05:50:27 am »
I know the last response was in May but this may help those who want to use sfml-2.0-rc with netbeans.

I got it working just fine by including the windows.h file before any of the other headers. Assuming your on windows of course.


 

anything