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

Author Topic: Cannot compile finished project pulled from GitHub!  (Read 3154 times)

0 Members and 4 Guests are viewing this topic.

aochrine

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Cannot compile finished project pulled from GitHub!
« on: August 18, 2016, 03:02:35 am »
Hey guys,

So I been working on a space shooter game on one computer and I finished it. I pushed all my work onto Github. Now I want to work a bit more on the game so I cloned my repo from github and opened up the project in Visual Studio. When I try to run the debug, I get "cannot open source file "SFML\Graphics.hpp". Before I compiled, I made sure to go into the project properties and made sure that my project points to the correct sfml include/lib location. I have the right dependencies. I basically did exactly what I did the first time before working on the project and it worked before. The only difference now is that I have the completed projected and then updated the project property whereas before I configured the project property  and then started to work on the project. I'm sure if I just started a new project, configure the project property correctly, and copy paste all my code it would work ... but I don't want to do that! Any fix?

Thanks in advance.

« Last Edit: August 18, 2016, 08:51:42 pm by aochrine »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
AW: Cannot compile finished project pulled from GitHub!
« Reply #1 on: August 18, 2016, 04:29:21 pm »
So are the paths still set correctly when you open the project? Are you using absolute or relative paths?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

aochrine

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #2 on: August 18, 2016, 05:57:30 pm »
All path are set correctly. I'm using absolute path. For example, went into the sfml include folder and copied the address and it looks like "C:......\SFML...\include"

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #3 on: August 18, 2016, 07:47:20 pm »
Can you provide the full build command?

And I assume the SFML is still located at the same place where ever you're git cloning the repo?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

aochrine

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #4 on: August 18, 2016, 08:43:36 pm »
Could you clarify what the full build command is?

I have the SFML folder on my desktop and the folder i cloned is also on my desktop (but sfml folder is not in the folder i cloned). When I first cloned the project, the path were pointing to my where SFML folder was on my old computer. I then changed it to point to the right SFML path on my current computer.
« Last Edit: August 18, 2016, 08:55:20 pm by aochrine »

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: Cannot compile finished project pulled from GitHub!
« Reply #5 on: August 18, 2016, 10:58:30 pm »
are you sure your "additional includes" in VS are correct ?

go here
http://www.sfml-dev.org/tutorials/2.4/start-vc.php 

and find
The path to the SFML headers (<sfml-install-path>/include) to C/C++ » General » Additional Include Directories

aochrine

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #6 on: August 19, 2016, 04:05:11 am »
absolutely sure it's correct. I've done it before and it worked, but it's  not working now for some reason. What's weird is that it sometime registers the SFML folder, like if I go to one of my class's header file and type "#include <SFML\Graphics.hpp>" itll work, but when I do the same thing in main it doesn't work ...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #7 on: August 19, 2016, 12:52:08 pm »
Make sure you've added all the source files to the project, you need to do that explicitly.
Also make sure to use forward slashes <SFML/Graphics.hpp>.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

aochrine

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #8 on: August 20, 2016, 08:42:49 pm »
By source file do you mean the include and lib folder? Like those folders need to be IN my project folder?

aochrine

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Cannot compile finished project pulled from GitHub!
« Reply #9 on: August 20, 2016, 09:14:03 pm »
my project doesn't say "cannot open include file ..." nor does the error say "cannot open include file "SFML....": no such file or directory". The error only says cannot open source file "SFML\Graphics.hpp". I'm going to try using a different version of sfml and see if that works...