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

Author Topic: Missing files (stdafx.h and others)  (Read 1053 times)

0 Members and 1 Guest are viewing this topic.

Wolff

  • Newbie
  • *
  • Posts: 22
    • View Profile
Missing files (stdafx.h and others)
« on: July 14, 2018, 03:36:05 pm »
Hi, recently I finally got SFML to work under VS2017.
I made it so I dont have to configure everything every time I make a new project by creating an SFLM template, although I have to copy and paste the .dll files to the new directory each time but its not a problem.
First time it worked like a charm, but when I tried to make another project I get the error when I try to complile it saying that I'm missing stdafx.h file.
Sure enough, it usually creates one with each new project but with this one it says that it must've been deleted or moved. Even when I copy the stdafx.h file from another project it doesnt solve the problem.

Now I'm getting another error which reads:
fatal error C1083: Cannot open precompiled header file: 'Debug\TestSFML.pch': No such file or directory.

Thanks for all the help and tips!

Hapax

  • Hero Member
  • *****
  • Posts: 3357
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Missing files (stdafx.h and others)
« Reply #1 on: July 14, 2018, 09:33:25 pm »
Its often recommended (and I also usually use this approach as it's cleaner and nice to know what's been added) to:

create an Empty Project, then
add stuff you need.

If you want to make a template out of that then that's okay too.

You may also want to look into Property Sheets as well; it allows you to just add certain properties that you want to add. For example, you could add SFML property sheets whenever you use SFML; they would just be the settings that you change when you use SFML; everything can be left unaltered. Simpler than manually typing all the things in each time, for sure.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*