danieru Posted April 24, 2014 Share Posted April 24, 2014 Trying to compile any C++ project generated by the Project Manager always gives an error saying " the use of `tmpnam' is dangerous, better use `mkstemp' ". I'm using Ubuntu 14.04 as operating system, Code::Blocks 13.12 as IDE and g++ 4.8.2 as compiler. Quote Link to comment Share on other sites More sharing options...
Guppy Posted April 24, 2014 Share Posted April 24, 2014 -Wno-deprecated-declarations Still better to solve it and avoid The potential race condition 1 Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
Josh Posted April 24, 2014 Share Posted April 24, 2014 What file is this found in? 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
danieru Posted April 24, 2014 Author Share Posted April 24, 2014 What file is this found in? File: /home/josh/Leadwerks/Engine/Source/Libraries/lua-5.1.4/loslib.c Line: 60 Message: aviso: the use of `tmpnam' is dangerous, better use `mkstemp' It also gives me 9 warnings. Screenshot: Quote Link to comment Share on other sites More sharing options...
Josh Posted April 24, 2014 Share Posted April 24, 2014 Ah, it's in one of the third-party libraries. My rule is I do not modify these unless I have to. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
danieru Posted April 24, 2014 Author Share Posted April 24, 2014 I tried using -Wno-deprecated-declarations But I still get the annoying message. Problem solved. Because the message said " aviso: " and not " warning: " Code::Blocks interpreted as an error, stopping the compilation. So the way to fix it is change the language of gcc output to english. Even so I still have more errors... the second was: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' So I added -pthread to linker settings, and now I have another error undefined reference to symbol 'XGetWindowAttributes' I have already installed libx11-dev, so again i have no idea Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.