SFML community forums

Help => Graphics => Topic started by: Darkivader on April 14, 2009, 01:34:33 am

Title: Window and System librarys needed for Graphics? Solved.
Post by: Darkivader on April 14, 2009, 01:34:33 am
Hello, im new to SFML, and recently got it set up on VS2008 Express. Everything seems to be working fine, except for the fact that i cannot compile any code that uses the graphics include/library without the window and system include/librarys being included also. This isnt a critial problem, but while reading the tutorial it said that window is included in graphics, therefore you would not need to include/link to it?

Im using the latest SVN debug static build of SFML which i downloaded using tortoiseSVN.

Thanks for any help.
Title: Window and System librarys needed for Graphics? Solved.
Post by: Tank on April 14, 2009, 01:41:30 am
Graphics doesn't include the window package, they're completely separated.
Title: Window and System librarys needed for Graphics? Solved.
Post by: Darkivader on April 14, 2009, 02:16:58 am
Thanks for clarifying, I guess I must have misinterpreted the documentation.
Title: Window and System librarys needed for Graphics? Solved.
Post by: Laurent on April 14, 2009, 08:30:10 am
Quote
Graphics doesn't include the window package, they're completely separated.

It does include the sfml-window headers (just have a look at the header file...). However it doesn't link to the sfml-window library.
Title: Window and System librarys needed for Graphics? Solved.
Post by: Tank on April 15, 2009, 01:28:03 am
Quote from: "Laurent"
Quote
Graphics doesn't include the window package, they're completely separated.

It does include the sfml-window headers (just have a look at the header file...). However it doesn't link to the sfml-window library.

I guess nobody was talking about including a header file, but about the package in general terms, which implies the lib.
Title: Re: Window and System librarys needed for Graphics? Solved.
Post by: Nexus on April 15, 2009, 02:39:51 am
I guess somebody was (even if not exclusively). ;)
Quote from: "Darkivader"
include/library [...] include/link
Title: Window and System librarys needed for Graphics? Solved.
Post by: Laurent on April 15, 2009, 08:36:58 am
Quote
I guess nobody was talking about including a header file, but about the package in general terms, which implies the lib.

Including a package requires both the headers and the libraries. I thought it was relevant to say that SFML already does the former.
I was also trying to make what the tutorial says less confusing: "includes the window package" really means includes its header files.
Title: Window and System librarys needed for Graphics? Solved.
Post by: Tank on April 15, 2009, 01:40:53 pm
True, from the code's perspective. The tutorial states:
Quote
SFML/Window.hpp is no more explicitly requiered, as it is already included by the graphics package.

I wonder that this sentence didn't clarify everything. ;)