Hello everybody...
I am a long term C++ developer under Win32 and I have managed to
successfully create and compile several C++ applications under RedHat Linux
6.0 using the GNU gcc-2.91.66.
I am starting to develop applications for the FreeBSD plataform but I have
faced the following problems:
1- I have developed a library whose header contain the following elements:
* Standard C++ class definitions like:
class A{
...
};
* Template functions and classes like:
template <class _A> _A myfunc(...);
template <class _B> class myclass{
...
};
I have installed gcc295 from the ports collection in FreeBSD
3.3-RELEASE which includes the STL.
whenever I compile the library using gcc295 I get the following
error:
gcc295 -DHAVE_CONFIG_H -I. -I. -I.. -D_GNU_SOURCE -O2 -c WebPlusApp.cpp
In file included from WebPlusApp.cpp:7:
/usr/local/include/cgi-lib/cgi-lib_t.h:14: parse error before `>'
this is the actual code, line 14 is the one with template definition...
-----cgi-lib_t.h-------
namespace cgi{
//////////////////////////////////////////////////////////////////////
// Template functions and types
//////////////////////////////////////////////////////////////////////
template<class _Fn, class _A1, class _A2, class _A3, class _R> struct
MyStruct
{
typedef _Fn first_argument_type;
.....
---------------------------------------------
The same source code will compile perfectly under RedHat Linux 6.0
(gcc-2.91.66) and Win32 (VC++6.0)
Is there any issue with gcc under FreeBSD I should be aware of?
Can anybody point me in the right direction where to look for information
about doing C++ under FreeBSD?
I have read the man pages, searched the gnu and FreeBSD web sites but can
not find anything related to it.
Any help will be greatly appreciated
Thanks
Rogelio J. Baucells
Advanced Total Systems, Inc.