Warnings with VS2008 and Quantlib but no Errors....

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Warnings with VS2008 and Quantlib but no Errors....

sandeep.prasad

Dear All,

I have written the following Simple Code in VS 2008 it compiles and executes ine but it gives warnings:


#include "stdafx.h"
#include<iostream>
#include<ql/quantlib.hpp>
#include<ql\math\randomnumbers\boxmullergaussianrng.hpp>
using namespace std;
int main(int argc, char* argv[])
{
        std::cout<<"HelloWorld";
        system("pause");
        return 0;
       
}
========================================
The warnings are like:

1>------ Build started: Project: hello, Configuration: Release Win32 ------
1>Compiling...
1>hello.cpp
1>C:\QuantLib-0.9.6\ql/math/array.hpp(210) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(221) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(232) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(249) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(256) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(710) : see declaration of 'std::transform'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(265) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'

==========================================================================================

Regards,
Sandeep Prasad
Tata Consultancy Services
Plot No 1, Survey No. 64/2, Software Units Layout
Serilingampally Mandal, Madhapur
Hyderabad,Andhra Pradesh
India
Ph:- 04066673582
Cell:- 9640795927
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Warnings with VS2008 and Quantlib but no Errors....

Boris Skorodumov
Sandeep,
In project property, C/C++/Preprocessor/Preprocessor Definitions add _SCL_SECURE_NO_WARNINGS
Boris.

On Mon, May 11, 2009 at 2:40 AM, Sandeep Prasad <[hidden email]> wrote:

Dear All,

I have written the following Simple Code in VS 2008 it compiles and executes ine but it gives warnings:


#include "stdafx.h"
#include<iostream>
#include<ql/quantlib.hpp>
#include<ql\math\randomnumbers\boxmullergaussianrng.hpp>
using namespace std;
int main(int argc, char* argv[])
{
        std::cout<<"HelloWorld";
        system("pause");
        return 0;
       
}
========================================
The warnings are like:

1>------ Build started: Project: hello, Configuration: Release Win32 ------
1>Compiling...
1>hello.cpp
1>C:\QuantLib-0.9.6\ql/math/array.hpp(210) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(221) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(232) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(249) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(256) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(710) : see declaration of 'std::transform'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(265) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'

==========================================================================================

Regards,
Sandeep Prasad
Tata Consultancy Services
Plot No 1, Survey No. 64/2, Software Units Layout
Serilingampally Mandal, Madhapur
Hyderabad,Andhra Pradesh
India
Ph:- 04066673582
Cell:- 9640795927
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Warnings with VS2008 and Quantlib but no Errors....

chenjiakai
In reply to this post by sandeep.prasad

Sandeep,

 

I have noticed that you have #include "stdafx.h" in your code.  Have you choose the option ‘empty project’ when you create a Win32 console project? 

 

Jiakai

 

 


From: Sandeep Prasad [mailto:[hidden email]]
Sent: Monday, May 11, 2009 2:40 AM
To: quantlib-users
Subject: [Quantlib-users] Warnings with VS2008 and Quantlib but no Errors....

 


Dear All,

I have written the following Simple Code in VS 2008 it compiles and executes ine but it gives warnings:


#include "stdafx.h"
#include<iostream>
#include<ql/quantlib.hpp>
#include<ql\math\randomnumbers\boxmullergaussianrng.hpp>
using namespace std;
int main(int argc, char* argv[])
{
        std::cout<<"HelloWorld";
        system("pause");
        return 0;
       
}
========================================
The warnings are like:

1>------ Build started: Project: hello, Configuration: Release Win32 ------
1>Compiling...
1>hello.cpp
1>C:\QuantLib-0.9.6\ql/math/array.hpp(210) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(221) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(2576) : see declaration of 'std::copy'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(232) : warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\xutility(3071) : see declaration of 'std::equal'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(249) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(256) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(710) : see declaration of 'std::transform'
1>C:\QuantLib-0.9.6\ql/math/array.hpp(265) : warning C4996: 'std::transform': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
1>        C:\Program Files\Microsoft Visual Studio 9.0\VC\include\algorithm(868) : see declaration of 'std::transform'

==========================================================================================

Regards,
Sandeep Prasad
Tata Consultancy Services
Plot No 1, Survey No. 64/2, Software Units Layout
Serilingampally Mandal, Madhapur
Hyderabad,Andhra Pradesh
India
Ph:- 04066673582
Cell:- 9640795927
Mailto: [hidden email]
Website:
http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you
 
 

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users