First, check your core-dump file size limit by running: ulimit -c
If the output value is zero (0), programs will not be able to create a core dump.
To remedy the situation, you need the limit to be above zero.
You can make the limit as large as possible by running: ulimit -c unlimited
Caveats: A new limit only applies to processes started by the current shell. To change it for all processes, put the command in your .profile or .bashrc file.
Second, on Linux check your the default core dump directory: cat /proc/sys/kernel/core_pattern
If this file contains a path and file pattern, core dumps will be written into that path with the corresponding file pattern (assuming the directory is writable and has sufficient disk space).