On Wed, Jan 26, 2011 at 1:11 AM, adansilv...@hotmail.com <adansilv...@hotmail.com> wrote: > Balbir Singh <balbir@...> writes: > >> >> On Tue, Jan 25, 2011 at 2:26 AM, adansilva05@... >> <adansilva05@...> wrote: >> > Hi All, >> > >> > I want to develop an application in C/C++ that allows to make >> > calls directly to >> > cgroups, do you can make Cgroups operations from a program in C/C++? >> > >> > if possible, there is an API to do this, wich packages i should >> > install? or how i do this? >> > >> > or someone who can help me on this issue? >> > >> >> The library is written to be called from C/C++ code. Please see >> src/tools for examples of API usage. Please see tests as well. There >> is generated documentation at >> http://libcg.sourceforge.net/html/index.html. >> >> For pacakges to be installed, please see your distro, it should be >> libcgroup-devel or libcgroup-dev. >> >> Balbir >> >> > > > Hi Balbir, > > I have ubuntu 10.10, the package i need is libcgroup-dev. > I installed the package successfully (apt-get install libcgroup-dev). > > i try to compile a simple example that I did using this library, but > when compiling I have the following error: > > my little program to test: > > cgcreate.c > #include <libcgroup.h> > > int main(int argc, char *argv[]) > { > int ret = 0; > > /* initialize libcg */ > ret = cgroup_init(); > > return ret; > } > > to get compiling: > > root@comun-Inspiron-530s:~# gcc cgcreate.c -o create > /tmp/ccxO3B0V.o: In function `main': > cgcreate.c:(.text+0x12): undefined reference to `cgroup_init' > collect2: ld returned 1 exit status >
Did you link against libcgroup (please add -lcgroup)? Balbir ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel