• Advertisement
Sign in to follow this  

ubuntu and enet + codeblocks

This topic is 3824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey I recently switched to ubuntu, and everything is good (cant say I miss windows). Now the problem for me is to compile and use the enet library that I love so much. I downloaded the newest sourcecode from the webside, and unzipped it into a directory. ran ./configure and make, and it build the library fine. I now got a libenet.a inside the directory. A bit unsure on what to do next but I tried to "install" it by running sudo sh ./sh-install ./libenet.a /usr/lib Well now I want to include this into my project. (That is managed tru the ide:codeblocks) I clicked into the build options and added the library, (set as a none relativ path). The project still compiles fine with this added. Well when I copy the entire include folder from the dir where it was, into the project directory. (so its ./enet/ ) from the codeblocks project file. And #include "./enet/enet.h" I get a ton of errors.. Mostly from the other header files trying to include each other with #include "enet/somefile.h" as is says that It cant find the header file... Anybody got a idea on how to properly setup enet under ubuntu? *prefereably using codeblocks ide, but not nessesary.*

Share this post


Link to post
Share on other sites
Advertisement
First try "make install" inside the enet directory, as root. If that works, then you can add -lenet to your project dependencies, and it should work fine.

If that doesn't work (I don't know enet built specifics), then you can use your current set-up. Just make sure your IDE knows to pass the directory that contains the "enet" folder (with headers) to the compiler include path. It probably looks
something like "-I." on the command line.

Last, this isn't a networking question at all -- it's a UNIX build/compile question.

Share this post


Link to post
Share on other sites
Well that solved it, and sorry for posting in the wrong forum.
Dint mean to do that.

thanks for the help :D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement