User forums > General (but related to Code::Blocks)
[solved] the use of `tmpnam' is dangerous, better use `mkstemp'
danieru:
When trying to compile any C++ project that uses tmpnam it gives an error saying " the use of `tmpnam' is dangerous, better use `mkstemp' ".
I read that using the option -Wno-deprecated-declarations should work, but it didn't work for me.
I think the mistake is that I'm not writing -Wno-deprecated-declarations where it should. So if someone could tell me where I should write -Wno-deprecated-declarations would be very helpful.
ollydbg:
This is not a question related to C::B. Please find a place you can get the correct answer.
Please respect our forum rules. Thank you.
See: FAQ
EDIT:
As stahta01 said, you can put GCC build options there.
stahta01:
My guess of the CB location is this:
"Project" -> "Build Options..."
Tab "Compiler Settings"
Sub-Tab "Other Options"
Tim S.
danieru:
--- Quote from: stahta01 on April 25, 2014, 03:42:52 am ---My guess of the CB location is this:
"Project" -> "Build Options..."
Tab "Compiler Settings"
Sub-Tab "Other Options"
Tim S.
--- End quote ---
Thank you! now I can be sure it is in the right place. But the error message still appears. Even so the message "the use of` tmpnam 'is dangerous, better use `mkstemp'" should be only a warning and not an error. right?
What makes me think that maybe CB is interpreting it as an error.
danieru:
maybe a screenshot help
Navigation
[0] Message Index
[#] Next page
Go to full version