How do I create a soft link programmatically in C/C++? link() system call in freebsd will create a hard link.
The system call you want is symlink(2).
#include <unistd.h>
int symlink(const char *name1, const char *name2);
A symbolic link
name2
is created toname1