Sign in to follow this  
CoMaNdore

ubuntu and enet + codeblocks

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this