Skip to main content
gamedev.net
🔒 Locked

ubuntu and enet + codeblocks

Started by CoMaNdore Aug 2, 2007 at 7:14 PM 1 replies 1.5k views
Original Post
CoMaNdore
CoMaNdore
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.*
Me
hplus0603
hplus0603
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.
enum Bool { True, False, FileNotFound };
CoMaNdore
CoMaNdore
Well that solved it, and sorry for posting in the wrong forum.
Dint mean to do that.

thanks for the help :D
Me

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.