New answers tagged

0

That's it, finally managed to enable it, took 6 hours researching. Got it with help from https://www.eclipse.org/forums/index.php/t/305157/. Entered in Run Configuration, in perspective and set: At Main tab: Project: nameofproject C/C++ Application: /usr/bin/gnome-terminal Arguments tab: Program arguments: -e ./nameofproject* ** you can add ...


0

g++ is the extension of GCC, If you do : apt-get install g++ Then itself installs gcc,g++ and other dependencies. g++ is good solution for compiling c++. If you need to compile with a standard , You can use : g++ your_file.cpp --std=c++11 For more information about standards, please read man gcc.


0

Thomas Dickey's answer addresses the issue in general, for any (ELF) binary. Given the way your question's phrased, you might find the __DATE__ and __TIME__ predefined macros useful; they allow the compilation date and time to be referred to within a program (so a program knows its own compilation date and time). Here's a quick example: #include ...


0

stat -c %z displays last creation/updating time of file and it's not changeable or preservable. Hence if you copy the file to other place, it will always get new now creation time. What are you looking for is stat -c %y, to display last modification time, which is usually preserved by most tools dealing with files and directories.


0

You can copy preserving the modification time, e.g., cp --preserve=timestamps source destination or (more generally: mode, ownership and timestamps) cp -p source destination although in some cases, preserving ownership is not wanted. Similarly, you can copy to remote systems using scp's -p option: scp -p source remote:destination but scp does not ...


1

Being Debian/Ubuntu based, it's not likely that the problem is due to rpath (still possible). More likely you're getting into trouble with "LD_LIBRARY_PATH=." which doesn't provide an absolute pathname. You can use strace to show which paths the executable tries to open, e.g., strace -f -o strace.log mono myprogram and look for the "open" calls. In ...


1

system() really just runs command lines. Its not a pipe like thing. The smallest possible change to make your example program work would be int main() { system("echo test msg | mail -s test_mail xxxx@testdomain.com"); return 0; } because then your message is going into mail program standard input via a pipe. More practical would be for you to ...



Top 50 recent answers are included