Ns3 on jetbrains clion ide

1,090 views
Skip to first unread message

ashish sharma

unread,
Jul 27, 2017, 11:09:14 AM7/27/17
to ns-3-...@googlegroups.com
Is there a way to run ns3 on jetbrains clion ide. It needs a  cmake file. 

??



On 27-Jul-2017 17:57, "Asrat Beyene" <ambn...@gmail.com> wrote:
Dear All,

I faced challenges, several times, using helper based definition of a model and changing it to its smart pointer counter part, for example, during access to instantaneous data. I know the great simplification of coding while using ns3 features via helpers but sometimes like MobiliityHelper vs Ptr<MobilityModel> and YansWifiChannelHelper vs Ptr<YansWifiChannel> the challenge is huge.

So, I am wondering what is the exact inter-relationship between a model's helper and smart pointer? Is there a simpler procedure or a kind of rule-of-thumb to simplify interchangeable usage or conversion?

Regards,

Asrat


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Jul 28, 2017, 5:39:37 AM7/28/17
to ns-3-users
Hi

i have not used JetBrains CLion, but you can configure the build system similar NetBeans that requires Makefile

Regards
K

Jack Hodgkiss

unread,
Jul 28, 2017, 10:41:27 AM7/28/17
to ns-3-users
Hi,

Unfortunately CLion only supports CMake-based projects at this point in time. 

So in order to make CLion and NS3 work together the project CMakeLists.txt file must modified to look something like the attached file.

Obviously you would want to change the project name, paths for include and link directories to match your setup in addition to the target_link_libraries command to better reflect your projects needs.

Finally we needed to specify our environment variables for the Run/Debug configuration. 
  • Go to Run -> Edit Configurations
  • Click the button next to the 'Environment variables' field
  • Click add new variable
  • For name provide 'LD_LIBRARY_PATH'
  • For value provide the path to NS3 libraries in the build directory e.g '/home/jack/NS3/ns-3.26/build'
You should now be able to compile NS3 simulations with CLion.

If anyone has a problem implementing this solution don't hesitate to get in touch. 

On Thursday, July 27, 2017 at 4:09:14 PM UTC+1, ashish sharma wrote:
Is there a way to run ns3 on jetbrains clion ide. It needs a  cmake file. 

??


On 27-Jul-2017 17:57, "Asrat Beyene" <ambn...@gmail.com> wrote:
Dear All,

I faced challenges, several times, using helper based definition of a model and changing it to its smart pointer counter part, for example, during access to instantaneous data. I know the great simplification of coding while using ns3 features via helpers but sometimes like MobiliityHelper vs Ptr<MobilityModel> and YansWifiChannelHelper vs Ptr<YansWifiChannel> the challenge is huge.

So, I am wondering what is the exact inter-relationship between a model's helper and smart pointer? Is there a simpler procedure or a kind of rule-of-thumb to simplify interchangeable usage or conversion?

Regards,

Asrat


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
CMakeLists.txt
Reply all
Reply to author
Forward
0 new messages