I am new to libhistory, so I looked at the sample found with the readline library. Compiled on the command line using:
gcc -o ./a.out /usr/local/share/readline/histexamp.c -lreadline -L/usr/local/lib/
It compiles and maintains the story.
He then broke the xcode project with the same file and linked it to the readline library that it compiles. But when I run, it will not support history and crash when listing history records. After some testing, I found that the -isysroot argument is the cause of this problem:
-isysroot /Developer/SDKs/MacOSX10.6.sdk
The gcc man page says that isysroot is similar to the -sysroot option, but applies only to header files.
Why does the same program behave differently with this option?
source share