"./libns3.19.rc2-openflow-debug.so: undefined reference to" error

74 views
Skip to first unread message

Sakshi

unread,
Apr 30, 2014, 10:16:48 AM4/30/14
to ns-3-...@googlegroups.com
I created the a class with static member in an header file. I am getting the following error.

./libns3.19.rc2-openflow-debug.so: undefined reference to `ns3::packettobuffer::m_packettobuffer'
collect2: ld returned 1 exit status
./libns3.19.rc2-openflow-debug.so: undefined reference to `ns3::packettobuffer::m_packettobuffer'
collect2: ld returned 1 exit status

Pl. reply.

Thank you,

Tom Henderson

unread,
Apr 30, 2014, 11:23:34 AM4/30/14
to ns-3-...@googlegroups.com
Typically this occurs when one neglects to define the member somewhere
after the class definition. Is m_packettobuffer defined somewhere in
the .cc file?

e.g. an example can be found in line 63 of
http://code.nsnam.org/ns-3-dev/file/1c733dcc50b2/src/internet/model/tcp-l4-protocol.cc

- Tom

sakshi chourasia

unread,
Apr 30, 2014, 11:42:27 AM4/30/14
to ns-3-...@googlegroups.com
Thanks Tom. Now it is working.




--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/w1m1Hss9Zsg/unsubscribe.
To unsubscribe from this group and all its topics, 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 http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Sakshi Chourasia,
MS Scholar,
Department of CSE,
IIT Madras.

Hajar Hantouti

unread,
Dec 3, 2015, 5:51:48 AM12/3/15
to ns-3-users
Hello,

I'am having similar error with my static struct variable.

how I'm I expected to define it in the .cc file ?
does it need to be initialized ?
 I only use it in a function like that:

Myclass::m_struct_var.push_back(data);

Cordially,
Hajar
Reply all
Reply to author
Forward
0 new messages