slang linking probs in slackware
I'm an outright C/C++ newbie and have copied some code for slang & ncurses from "Linux Bible 2007" however when I go to compile the code it throws up "undefined reference to..." for all the functions that are not from stdio.h, followed by something about ld returning an error. I know that I copied the code right but the lib linking is going wrong.
|
Since a couple of Slackware versions ago, there are two slang libraries in Slack. The oolder code you are using probably needs to be linked to -lslang1.
|
Okay, I get the bit about libs but how exactly do I implement that?
|
When you compile your program, add "-lslang1" to the command you use to compile, which says to link the slang1 library. For example, if your source file was called slangexample.cpp, you'd use something like "g++ slangexample.cpp -o slangexample -lslang1".
|
All times are GMT -5. The time now is 03:09 AM. |