SFML community forums
Help => General => Topic started by: YukiTrance on September 25, 2013, 03:30:02 am
-
I'm sort-of new to SFML and I seem to be having a huge problem. I'm using MSVS 2010. My configuration is as follows.
The problem is that MSVS isn't detecting headers and I can't find the issue.
(http://i.imgur.com/3UYyV3n.png)
(http://i.imgur.com/C1QkBB9.png)
(http://i.imgur.com/erWhBtC.png)
(http://i.imgur.com/YZnBliA.png)
(http://i.imgur.com/VnXYQuK.png)
-
The problem is that MSVS isn't detecting headers and I can't find the issue.
How are you noticing this?
Do you get a compiler or linker error? If so, can you post it here? :)
-
How are you noticing this?
Do you get a compiler or linker error? If so, can you post it here? :)
Intellisense isn't suggesting the SFML/ folder. The #import is underlined red.
Build errors:
IntelliSense: cannot open source file "c:/Users/Kyle/documents/visual studio 2010/Projects/Kit/Kit/Debug/Window.tlh"
IntelliSense: cannot open source file "c:/Users/Kyle/documents/visual studio 2010/Projects/Kit/Kit/Debug/Graphics.tlh"
Only code I have right now is just a basic "int main()" with a return. I'm importing the Window and Graphics module as well.
-
Intellisense is the autocompletion tool. It has nothing to do with the compiler or the linker, so errors with it should have no effect whatsoever on your ability to compile and run your code. Have you actually tried building and running or did you stop as soon as you saw these errors?
-
Intellisense is the autocompletion tool. It has nothing to do with the compiler or the linker, so errors with it should have no effect whatsoever on your ability to compile and run your code. Have you actually tried building and running or did you stop as soon as you saw these errors?
Forgot to mention that I already tried building. Breaks on "#import <SFML/Window.hpp>", which is the first line.
error C1083: Cannot open type library file: 'c:\sfml-2.1\include\sfml\window.hpp': Error loading type library/DLL.
-
I've never heard of #import. Have you tried a standard #include instead?
-
EDIT: Yes, sorry, I meant #include. Got mixed up with another language.
I've found the problem. I created an empty project instead of a Win32 project.
Not sure why it would actually matter, but that was the problem.
Another problem, which I got before but thought it had to do with the headers, is that after about 3-4 seconds, I get an access violation.
Which, as I've experienced before, stops the program from actually going through with its code.
"Unhandled exception at 0x76f7fc1b in kit.exe: 0xC0000005: Access violation writing location 0x00790ffc."
-
Run a debug build so the debugger can tell you exactly where why and how the access violation happened.
Edit:
I've found the problem. I created an empty project instead of a Win32 project. Not sure why it would actually matter, but that was the problem.
This sounds strange enough I decided to quickly try it myself. An "empty" project with standard hello world code seems to build and run just fine for me (Visual C++ 2010 Express). No idea what happened to you. Oh well.
-
It's anyways better to start your project off an empty project, rather than a Win32 project, because the Win32 project already adds a few things you don't really need. Why it wouldn't work with Win32, I don't know.
As for access violation, we can't really help further. You'll need to provide the code and at best run it as Ixrec suggested through the debugger to find out where it crashes.
-
It's anyways better to start your project off an empty project, rather than a Win32 project, because the Win32 project already adds a few things you don't really need. Why it wouldn't work with Win32, I don't know.
As for access violation, we can't really help further. You'll need to provide the code and at best run it as Ixrec suggested through the debugger to find out where it crashes.
I'm still not really sure what the problem was with it, but it seems to work now for some reason.