Enet and gcc compiling
Sorry I'm lazy. I installed enet 1.3.13 and was trying to compile the host.c file but run into errors:
[bkeane@localhost enet-1.3.13]$ gcc -o host host.c `pkg-config --libs libenet` Package libenet was not found in the pkg-config search path. Perhaps you should add the directory containing `libenet.pc' to the PKG_CONFIG_PATH environment variable Does anyone know the gcc command to manually link enet and what files I need? |
Try this:
Code:
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" |
If you did
Code:
$ cd enet-1.3.13/ && ./configure && make Either copy libenet.pc to /usr/lib/pkgconfig/ Or do .. Code:
$ export PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig/ \ |
if you have no libenet no gcc command can help you. Probably you need to install enet or enet related development package.
|
Yeah, I keep forgetting that distributors split packages into 'base' and 'devel' parts (sometime more), eg 'libenet7' and 'libenet-dev'
|
Quote:
https://github.com/lsalzman/enet/blob/master/host.c |
I'm compiling the host.c program to verify the install. Is there a better way?
|
look: I'm a bit confused, at this moment I have no idea what do you want to achieve.
First: what OS is it? What did you install exactly, and how (you told you installed enet 1.3.13)? What is in your enet-1.3.13 directory? Why do you think host.c is a program? or What do you mean by that? |
As others have said, it is really unclear what you are trying to accomplish.
Please try to restate your question and include: * Your distro and version * What, exactly you are trying to accomplish - you ultimate goal, not the goal of the gcc command Pleas also see this page and the links at bottom thereof for guidance in asking a good and complete question, so that members here may better help you. |
All times are GMT -5. The time now is 10:42 AM. |