Results 1 to 5 of 5

Thread: Getting an Error while using OpenGL and Visual C++ 2008 Express Edition

  1. #1
    Join Date
    May 2008
    Posts
    2,297

    Getting an Error while using OpenGL and Visual C++ 2008 Express Edition

    Hi Friends,
    I am using OpenGL and Visual C++ 2008 Express Edition as our IDE while currently working with our project. I am getting one error and 10 warnings when I am trying to build the project. The Error "C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(256) : see declaration of 'fscanf'
    .\walker\walk\walker.cpp(270) : warning C4996: 'fscanf': This function or variable may be unsafe. Consider using fscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details." is coming for many times. Does anyone know how to resolve this error.?? Please help me as soon as possible.!!

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to disabling deprecation in VC++ Express Edition?

    According to me by disabling deprecation in VC++ Express Edition, your problem should be solved. You can do the following settings for disabling deprecation in VC++ Express Edition :
    • Go to the Project Properties
    • Then click on the Configuration.
    • Project properties->Properties->C/C++->Preprocessor->Preprocessor Definitions
    • Click on the elipses (...)

    type any definitions you like separated by "\n"ie
    _CRT_SECURE_NO_WARNINGS

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Getting an Error while using OpenGL and Visual C++ 2008 Express Edition

    In C++, the easiest way to do that is to use Secure Template Overloads, which in many cases will eliminate deprecation warnings by replacing calls to deprecated functions with calls to the new secure versions of those functions. There are several ways to eliminate deprecation warnings for the older, less secure functions. The simplest is simply to define _CRT_SECURE_NO_WARNINGS or use the warning pragma. Either will disable deprecation warnings, but of course the security issues that caused the warnings still exist. consider this deprecated call to strcpy in C++ :
    char szBuf[10];
    strcpy(szBuf, "test"); // warning: deprecated

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Getting an Error while using OpenGL and Visual C++ 2008 Express Edition

    I was facing the similar problem. While linking I was getting the fatal error LNK1104: cannot open file 'glut32.lib'. Hope that you should also got this error which you have not posted. You can check this error by going to the BuildLog.htm which would be saved at the "file://g:\Interface - Copy\Interface - Copy\Interface\Debug\BuildLog.htm". The error of cannot open file 'glut32.lib', means that glut32.lib is not in the library path for your project. You will need to set your project to look for library files wherever you extracted Glut at.You can do this via: Tools->Options->Projects and Solutions->VC++ Directories->Show Directories for Library Files and add the path there. Hope that doing this will resolve your problem too.

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Getting an Error while using OpenGL and Visual C++ 2008 Express Edition

    Even I think that you have not included the glut32.lib in the library path for your project. 'Modifier' already told you the one way for including the glut32.lib in the library path of your project. If that is not working then you can try the another way, you can follow the steps to add the path to Glut into your project's settings. Go to the Properties by right clicking on your project in the solution explorer. Then select the Configuration Properties. In the Configuration Properties, select the Linker option. In that select the General tab and fill in the path in the "Additional Library Directories". Doing this will also resolve your problem.

Similar Threads

  1. Replies: 4
    Last Post: 16-06-2011, 06:57 AM
  2. Replies: 3
    Last Post: 02-04-2011, 07:33 AM
  3. How to use Visual Basic 2008 Express with Windows 7
    By Breath in forum Software Development
    Replies: 5
    Last Post: 28-01-2010, 04:34 PM
  4. Compare Visual Studio 2010 and Visual Web Developer Express
    By Zacharia in forum Software Development
    Replies: 5
    Last Post: 28-01-2010, 04:27 AM
  5. Replies: 2
    Last Post: 12-01-2009, 08:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,723,297.02882 seconds with 17 queries