Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



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

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 19-01-2010
Member
 
Join Date: May 2008
Posts: 2,292
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.!!

Reply With Quote
  #2  
Old 19-01-2010
Member
 
Join Date: Apr 2008
Posts: 2,000
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
Reply With Quote
  #3  
Old 19-01-2010
Member
 
Join Date: May 2008
Posts: 2,007
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
Reply With Quote
  #4  
Old 19-01-2010
Member
 
Join Date: Jan 2008
Posts: 1,515
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.
Reply With Quote
  #5  
Old 19-01-2010
Member
 
Join Date: Feb 2008
Posts: 1,845
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Getting an Error while using OpenGL and Visual C++ 2008 Express Edition"
Thread Thread Starter Forum Replies Last Post
installation error: Visual C# 2008 Express setup defaults to Maintenance Mode Fadheela Software Development 4 16-06-2011 07:57 AM
Error “Error 0x80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332)", while Windows Updating. Qamar Operating Systems 3 02-04-2011 08:33 AM
How to use Visual Basic 2008 Express with Windows 7 Breath Software Development 5 28-01-2010 04:34 PM
Compare Visual Studio 2010 and Visual Web Developer Express Zacharia Software Development 5 28-01-2010 04:27 AM
Compiler Error in Visual Studio 6,while adding OpenGL as header files. Santanio Software Development 2 12-01-2009 08:40 PM


All times are GMT +5.5. The time now is 03:29 AM.