Creating a template in Visual Studio Community 2015

Hi,

I'm having problems creating a template for the following code in VS

#define _CRT_SECURE_NO_WARNINGS

#define GLEW_STATIC
#include < GL/glew.h >
#define GLFW_DLL
#include < GLFW/glfw3.h >

#include < stdio.h>
#include < time.h >
#include < stdarg.h >
#include < assert.h >

int main(int argc, char argv[])
{
GLFWwindow* window;

/* Initialize the library */
if (!glfwInit())
return -1;

/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}

/* Make the window's context current */
glfwMakeContextCurrent(window);

/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
/* Render here */

/* Swap front and back buffers */
glfwSwapBuffers(window);

/* Poll for and process events */
glfwPollEvents();
}

glfwTerminate();
return 0;
}

When I try to export the file to a template I get a message box saying

Template export failed for the following reason: Access to the path

followed by my own path

is denied.

Can anyone help me out ?

FC.




Where do you want to save it?
Default location is:
C:\Users\USERNAME\Documents\Visual Studio 2015\My Exported Templates\NAME.zip
Maybe this is a bit off-topic, though I don't see why would make a template out of that snippet rather than encapsulating a GLFW app inside a class. I think it would prove to be more productive.
Topic archived. No new replies allowed.