From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- pipermail/nel/2001-March/000378.html | 115 +++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 pipermail/nel/2001-March/000378.html (limited to 'pipermail/nel/2001-March/000378.html') diff --git a/pipermail/nel/2001-March/000378.html b/pipermail/nel/2001-March/000378.html new file mode 100644 index 00000000..9bb5ad4f --- /dev/null +++ b/pipermail/nel/2001-March/000378.html @@ -0,0 +1,115 @@ + + + + [Nel] ugh, C++ is so obtuse + + + + + + +

[Nel] ugh, C++ is so obtuse

+ Cyril Corvazier + corvazier@nevrax.com
+ Wed, 14 Mar 2001 16:57:42 +0100 +

+
+ +
>
+c++ -I/usr/local/include/freetype2 -I/home/pierre/STLport-4.0/stlport -g -O2
+>   -o client  character_interface.o client.o language_interface.o
+> login_interface.o move_listener.o pb_message_box.o player_view.o
+> shards_list_interface.o sight.o
+>
+lens_flare.o -lnelnet -lnelmisc -lnel3d -L/usr/local/lib -lfreetype -L/home/
+> pierre/STLport-4.0/lib  -lstlport_gcc
+> /usr/local/lib/libnel3d.so: undefined reference to
+> `NL3D::CTrackKeyFramerLinear<NL3D::CKeyQuat, NLMISC::CQuat> type_info
+node'
+> /usr/local/lib/libnel3d.so: undefined reference to
+> `NL3D::CTrackKeyFramerLinear<NL3D::CKeyQuat,
+NLMISC::CQuat>::getValue(void)
+> const'
+
+I have fixed that bug. It should be on the cvs tonight (GMT+1).
+
+*** For c++ addicts, here is the problem ***
+
+The link failed under GCC when we use non-inline functions in a template
+implementation.
+No problem with Visual C++ 6.0.
+
+It looked like this:
+
+in the .h file:
+-----------
+
+// Two template classes
+template<class T>
+class a
+{
+    virtual void toto()=0;
+};
+
+template<class T>
+class b : public a<T>
+{
+    virtual void toto()
+    {
+        ...
+    };
+};
+
+// The second one is implemented, but toto function body is in the .cpp
+file.
+class b<int> : public a<int>
+{
+    virtual void toto();
+};
+
+In the .cpp:
+-----------
+virtual void b<int>::toto()
+{
+    ...
+};
+
+The fixe was to let the toto body inline in the header.
+
+Any comments ?
+
+---
+Cyril Corvazier
+Lead 3d programmer
+Nevrax France
+
+
+
+
+ + + + +
+

+ -- cgit v1.2.1