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

Author Topic: VS 2013 isn't creating .exe-files in empty project (Solved)  (Read 9186 times)

0 Members and 1 Guest are viewing this topic.

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
So, I downloaded VS 2013 Community Edition together with corresponding SFML 2.3.1 (Visual C++ 12 (2013) - 32-bit) files today. I installed it all according to the instructions in the homepage. But it doesn't work...

When I start a new console Project, I Make sure it is an empty Project (check that check box). Add a .cpp file manually. Link all files (I tried both static and dynamic) to the Project and run the small code snippet from the example.

The odd thing is that I can build the code both in debug and release mode in VS. The folders for release and debug are created inside the Projects folder. But no .exe-files are created. Thus, when I hit F5 key, I get a warning that the compiler can't find the Projects exe-file. When I hit CTRL+F5 I get a console window with:  '"c:\users\name\documents\visual studio 2013\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe"' is not recognized as an internal or external command, operable program or batch file. Press any key to continue . . .

Ah, maybe there is some kind of path problem, I thought and scanned the whole computer for .exe-files created today, but they didn't show up. Conclusion - no exe-files have been created.

Why? I relly can't tell myself. This way to start a project used to work fine in old VS 2010... The only big difference I can see is that in VS 2010, I added a .cpp file myself when I started an empty Project and named it main.cpp. In VS 2013 It names itself automatically to Source1.cpp. But I doubt that is the problem since the build works without flaws.

Has anyone any ideas? I doubt it is an sfml error but instead some kind of fault in VS.

/Ingemar
« Last Edit: July 14, 2015, 10:39:17 am by ingwik »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: VS 2013 isn't creating .exe-files?
« Reply #1 on: July 13, 2015, 09:23:20 pm »
I doubt it is an sfml error but instead some kind of fault in VS.
You're right, creating executable files with SFML works just fine. I'm not sure what exactly you did wrong, maybe your VS installation or some of its configuration is broken.

I think you'll get better answers when looking on a different site than the SFML forum, as SFML is very unlikely to be the cause. Actually, that's the first thing you should try anyway: remove SFML dependencies and see how things work then.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: VS 2013 isn't creating .exe-files?
« Reply #2 on: July 13, 2015, 09:49:39 pm »
Indeed, I should have tried that some hours ago... When I create an empty console Project with standard c++ and add the cpp file manually, the same error appear. When I create a standard console Project, the exe-files are created. Really odd.

//Ingemmar

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: VS 2013 isn't creating .exe-files?
« Reply #3 on: July 13, 2015, 09:51:01 pm »
Try searching for your problem on the Internet. If nothing helps, as last resort, reinstall VS.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: VS 2013 isn't creating .exe-files?
« Reply #4 on: July 13, 2015, 10:14:51 pm »
If you manually choose to compile your application (not with hotkeys), what does the console output say in VS?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: VS 2013 isn't creating .exe-files?
« Reply #5 on: July 13, 2015, 10:16:03 pm »
I Think I found the culprit. At least I can run empty console Projects now. VS 2013 seems to demand that the cpp file is inserted manually in the Project inspector Before they can be used. Which was not the case in older version.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/4253e88a-7a32-48fd-b2fa-093bf41fcb38/unable-to-start-program-cexe-the-system-cannot-find-the-file-specified?forum=visualstudiogeneral

If you click 'Next' after File>New Project and select "Create Empty Project" then there are no files in the beginning, and you add them manually. It will build fine, but won't run. You need to add it to the source files list in the pane at right.

If you have already created and saved the file, then in the "Solution Explorer" pane at right, right click on "Source Files" and choose "Add existing". Then add the file. You'll find it displayed in the list below afterwards. Now it will link and run. If you have just created the empty project and have no files yet, then it's better to rightaway right-click on Source Files, and choose "Add new", and then begin writing your code.

This is especially confusing since this issue did not arise in old versions of VC++, and a person who is simply following a standard Windows programming book (Such as Charles Petzold's classic work) will find the instructions in the book apparently broken, even though the book is published by Microsoft Press itself, and is considered a VC++ coding Bible.

.
I'll continue to dabble with SFML tomorrow when I've had a good nights sleep...
« Last Edit: July 14, 2015, 10:45:27 am by ingwik »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: VS 2013 isn't creating .exe-files? (Solved)
« Reply #6 on: July 13, 2015, 11:05:06 pm »
Ah so the CPP file wasn't added to the project?
Yeah seems a bit counter intuitive if it had always worked in the past.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #7 on: July 14, 2015, 10:44:16 am »
Everything works as intended now, at least the code snippet in the example creates an SFML window with a green circle.  :) If it is any help for anyone else experiencing the same problem.

Static mode is different now though, compared to version 1.6, creating 67 errors just for the text row trying to create the window. (sf::Window window(sf::VideoMode(800, 600), "My window"); ) so I have to go for dynamic installations with all the dll:s to make it work.

But, as long as it works, I'm happpy :)

/Ingemar

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #8 on: July 14, 2015, 11:34:38 am »
Yes static linking has changed in SFML 2.2, read the tutorial for your SFML version if you still want to make it happen.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #9 on: July 16, 2015, 06:55:35 pm »
I actually created a PP for us who aren't too savy on programming. It shows, step by step, how to install SFML 2.3.x with VS 2013 Community Edition:

https://docs.google.com/presentation/d/1UiZdJTQJdyXBpXceSlcHDicFh0ew1ogY_UzmWzW0w5I/edit?usp=sharing

Rosme

  • Full Member
  • ***
  • Posts: 169
  • Proud member of the shoe club
    • View Profile
    • Code-Concept
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #10 on: July 16, 2015, 06:57:49 pm »
Because this wasn't clear enough?  :o
GitHub
Code Concept
Twitter
Rosme on IRC/Discord

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #11 on: July 16, 2015, 09:43:20 pm »
I know you meant it well, but... please don't write yet another inofficial tutorial on how to install SFML. The internet is already flooded with them. Most are either not read at all or serve the only purpose of fragmenting the knowledge and drawing people away from reading the official ones. The consequences can be seen in this forum: every day we get questions about trivial things that are explained in the tutorials.

If you want to do something good for the community, please promote the official tutorials and help us improve them where needed. Your time is invested much better like that.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

ingwik

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #12 on: July 16, 2015, 10:17:50 pm »
You are right, and they need to be fleshed out a bit. But if I add code or newbie examples, shall I post those in the wiki then?

Rosme

  • Full Member
  • ***
  • Posts: 169
  • Proud member of the shoe club
    • View Profile
    • Code-Concept
Re: VS 2013 isn't creating .exe-files in empty project (Solved)
« Reply #13 on: July 17, 2015, 04:26:56 pm »
Once again, how would it differ from the official tutorial? If you want to add to the wiki pretty much the exact same thing as the official tutorial, it's not really useful. Just more confusing. But if you think you can add something of value, go ahead I would say.
GitHub
Code Concept
Twitter
Rosme on IRC/Discord