help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] compilation problem in ns3


From: Ali Marandi
Subject: Re: [Help-glpk] compilation problem in ns3
Date: Fri, 27 Nov 2015 12:38:53 +0100

Hello Heinrich,

Thank you very much, for your comprehensive response.

I went through the manual of ns-3 so as to create a new module. Typically, when we need to create a module, it is required to have two files, i.e. one header file (extension .h) and another file which defines the methods declared in the header file (extension .cc). 

Based on the above argument, when I need to create the module "Glpk", I do have the first file (glpk.h). However, I cannot find some file (e.g. glpk.cc) which implements the methods declared in the glpk.h (e.g. glp_create_prob). Could you please give me some valuable guidance on how to deal with this ?

Thanks a lot in advance, for your guidance.

Best regards,
A

On Sat, Nov 21, 2015 at 6:54 PM, Heinrich Schuchardt <address@hidden> wrote:
Hello Ali,

waf is a build system. The project is hosted at http://wav.io

Please, read the documentation of waf at https://waf.io/book/

You will find that the file controlling building is called wscript. In
this file you have to provide the dynamic link libraries you want to use
(for GLPK on Linux this is libglpk.so).

An ns-3 example can be found in
https://github.com/nsnam/ns-3.16-git/blob/master/src/click/wscript

Probably you want to create an ns-3 module that encapsulates the GLPK
library first.

Afterwards you can use this module in your projects.

Best regards

Heinrich Schuchardt

On 21.11.2015 14:35, Ali Marandi wrote:
> Hello everyone.
>
> I am using the "glpk.h" in my code which I run in the ns-3 using waf.
> Even if I have put the file "glpk.h" in the directory in which my code
> is located, I receive the following errors once I run my code with
> "./waf --run":
>
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2183:
> undefined reference to `glp_create_prob'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2184:
> undefined reference to `glp_set_prob_name'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2185:
> undefined reference to `glp_set_obj_dir'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2186:
> undefined reference to `glp_add_rows'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2187:
> undefined reference to `glp_add_cols'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2192:
> undefined reference to `glp_set_col_bnds'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2193:
> undefined reference to `glp_set_obj_coef'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2199:
> undefined reference to `glp_set_row_bnds'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2223:
> undefined reference to `glp_load_matrix'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2224:
> undefined reference to `glp_simplex'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2229:
> undefined reference to `glp_get_col_prim'
> /home/ali/ns-allinone-3.21/ns-3.21/build/../scratch/LDNC+BF.cc:2295:
> undefined reference to `glp_delete_prob'
>
> Please note that I have included "glpk.h" in my code. And my machine is
> a ubuntu 14.04.
>
> I appreciate if you help me out with this.
>
> Thanks and regards,
> A
>
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]