1
General / Re: Visual Studio Community 2015 main.cpp missing from SFML_template
« on: October 13, 2016, 08:04:42 pm »
Greate, Jonny!
Could you share how exactly include source file (main.cpp) correctly using ExporteTemplate, because I didn't find any option of it in Export Template Wizard?
This is my steps:
First of all, I created the solution SFMLTest:
1) File/New/Project/Visual C++/Win32ConsoleAplication/SFMLTest
Next:
2) SFMLTest/Add/NewItem/C++File(.cpp)/main.cpp
Next:
3)SFMLTest/Properties/Configuration Properties/C/C++/General/AdditionalIncludedeDerictories/$(SolutionDir)/SFML/include
Next:
4)SFMLTest/Properties/Configuration Properties/Linker/General/AdditionalLibraryDerictories/$(SolutionDir)/SFML/lib
Next:
5)SFMLTest/Properties/Configuration Properties/Linker/Input/AdditionalDependencies/
sfml-main-d.lib
sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib
sfml-audio-d.lib
sfml-network-d.lib
Next:
6)The simple code in the main.cpp:
#include "SFML/Graphics.hpp"
#include <iostream>
using namespace std;
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Game!");
sf::CircleShape circle(50);
circle.setFillColor(sf::Color::Yellow);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
switch (event.type) {
case sf::Event::Closed:
window.close();
break;
}
}
window.clear();
window.draw(circle);
window.display();
}
}
The final step to create a template:
7)File/ExportTemplate/ProjectTemplate/Template name/Finish
That's all my steps to create a template from my SFMLproject file.
After that, I wasn't able to open main.cpp file from SourceFiles folder, my guess for this problem is that Template Exporter not include the source file correctly when created the template.
Could you point to my misstep I'll really appreciate your help?
Could you share how exactly include source file (main.cpp) correctly using ExporteTemplate, because I didn't find any option of it in Export Template Wizard?
This is my steps:
First of all, I created the solution SFMLTest:
1) File/New/Project/Visual C++/Win32ConsoleAplication/SFMLTest
Next:
2) SFMLTest/Add/NewItem/C++File(.cpp)/main.cpp
Next:
3)SFMLTest/Properties/Configuration Properties/C/C++/General/AdditionalIncludedeDerictories/$(SolutionDir)/SFML/include
Next:
4)SFMLTest/Properties/Configuration Properties/Linker/General/AdditionalLibraryDerictories/$(SolutionDir)/SFML/lib
Next:
5)SFMLTest/Properties/Configuration Properties/Linker/Input/AdditionalDependencies/
sfml-main-d.lib
sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib
sfml-audio-d.lib
sfml-network-d.lib
Next:
6)The simple code in the main.cpp:
#include "SFML/Graphics.hpp"
#include <iostream>
using namespace std;
int main() {
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML Game!");
sf::CircleShape circle(50);
circle.setFillColor(sf::Color::Yellow);
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
switch (event.type) {
case sf::Event::Closed:
window.close();
break;
}
}
window.clear();
window.draw(circle);
window.display();
}
}
The final step to create a template:
7)File/ExportTemplate/ProjectTemplate/Template name/Finish
That's all my steps to create a template from my SFMLproject file.
After that, I wasn't able to open main.cpp file from SourceFiles folder, my guess for this problem is that Template Exporter not include the source file correctly when created the template.
Could you point to my misstep I'll really appreciate your help?