Fri Apr 19 06:49:34 2024
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2016-11-01

LEARN

2024-04-19 | 2024-03-19 | 2024-02-19 | 2024-01-19 | 2023-12-19 | 2023-11-19 | 2023-10-19 | 2023-09-19 | 2023-08-19 | 2023-07-19 | 2023-06-19 | 2023-05-19 | 2023-04-19 | 2023-03-19 | 2023-02-19 | 2023-01-19 | 2022-12-19 | 2022-11-19 | 2022-10-19 | 2022-09-19 | 2022-08-19 | 2022-07-19 | 2022-06-19 | 2022-05-19 | 2022-04-19 | 2022-03-19 | 2022-02-19 | 2022-01-19 | 2021-12-19 | 2021-11-19 | 2021-10-19 | 2021-09-19 | 2021-08-19 | 2021-07-19 | 2021-06-19 | 2021-05-19 | 2021-04-19 | 2021-03-19 | 2021-02-19 | 2021-01-19 | 2020-12-19 | 2020-11-19 | 2020-10-19 | 2020-09-19 | 2020-08-19 | 2020-07-19 | 2020-06-19 | 2020-05-19 | 2020-04-19 | 2020-03-19 | 2020-02-19 | 2020-01-19 | 2019-12-19 | 2019-11-19 | 2019-10-19 | 2019-09-19 | 2019-08-19 | 2019-07-19 | 2019-06-19 | 2019-05-19 | 2019-04-19 | 2019-03-19 | 2019-02-19 | 2019-01-19 | 2018-12-19 | 2018-11-19 | 2018-10-19 | 2018-09-19 | 2018-08-19 | 2018-07-19 | 2018-06-19 | 2018-05-19 | 2018-04-19 | 2018-03-19 | 2018-02-19 | 2018-01-19 | 2017-12-19 | 2017-11-19 | 2017-10-19 | 2017-09-19 | 2017-08-19 | 2017-07-19 | 2017-06-19 | 2017-05-19 | 2017-04-19 | 2017-03-19 | 2017-02-19 | 2017-01-19 | 2016-12-19 | 2016-11-19 | 2016-10-19 | 2016-09-19 | 2016-08-19 | 2016-07-19 | 2016-06-19 | 2016-05-19 | 2016-04-19 | 2016-03-19 | 2016-02-19 | 2016-01-19 | 2015-12-19 | 2015-11-19 | 2015-10-19 | 2015-09-19 | 2015-08-19 | 2015-07-19 | 2015-06-19 | 2015-05-19 | 2015-04-19 | 2015-03-19 | 2015-02-19 | 2015-01-19 | 2014-12-19 | 2014-11-19 | 2014-10-19

Key: Value:

Key: Value:

MESSAGE
DATE 2016-11-05
FROM ruben safir
SUBJECT Subject: [Learn] Fwd: Template Library files and Header linking troubles
From learn-bounces-at-nylxs.com Sat Nov 5 19:35:04 2016
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82])
by mrbrklyn.com (Postfix) with ESMTP id 179E1161312;
Sat, 5 Nov 2016 19:35:04 -0400 (EDT)
X-Original-To: learn-at-nylxs.com
Delivered-To: learn-at-nylxs.com
Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62])
by mrbrklyn.com (Postfix) with ESMTP id A0506160E77
for ; Sat, 5 Nov 2016 19:34:54 -0400 (EDT)
References:
<87wpghenr0.fsf-at-bsb.me.uk>

<8fd740fc-af36-42d1-b0aa-96efe8fb8f44-at-googlegroups.com>
<3uadnWRenf4OyYPFnZ2dnUU78KnNnZ2d-at-giganews.com>
To: learn-at-nylxs.com
From: ruben safir
X-Forwarded-Message-Id:

<87wpghenr0.fsf-at-bsb.me.uk>
<8fd740fc-af36-42d1-b0aa-96efe8fb8f44-at-googlegroups.com>
<3uadnWRenf4OyYPFnZ2dnUU78KnNnZ2d-at-giganews.com>
Message-ID: <03c47384-c262-5205-74ad-fe66ce352834-at-mrbrklyn.com>
Date: Sat, 5 Nov 2016 19:34:54 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <3uadnWRenf4OyYPFnZ2dnUU78KnNnZ2d-at-giganews.com>
Content-Type: multipart/mixed; boundary="------------A18A84B2A89E41FFC2077E56"
Subject: [Learn] Fwd: Template Library files and Header linking troubles
X-BeenThere: learn-at-nylxs.com
X-Mailman-Version: 2.1.17
Precedence: list
List-Id:
List-Unsubscribe: ,

List-Archive:
List-Post:
List-Help:
List-Subscribe: ,

Errors-To: learn-bounces-at-nylxs.com
Sender: "Learn"

This is a multi-part message in MIME format.
--------------A18A84B2A89E41FFC2077E56
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit


--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
filename="Template Library files and Header linking troubles.eml"

Path: reader2.panix.com!panix!not-for-mail
From: Popping mad
Newsgroups: comp.lang.c++
Subject: Template Library files and Header linking troubles
Date: Sat, 5 Nov 2016 15:41:25 +0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID:
NNTP-Posting-Host: www.mrbrklyn.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: reader2.panix.com 1478360485 13949 96.57.23.82 (5 Nov 2016 15:41:25 GMT)
X-Complaints-To: abuse-at-panix.com
NNTP-Posting-Date: Sat, 5 Nov 2016 15:41:25 +0000 (UTC)
User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT b8fc14e
git.gnome.org/git/pan2)
Xref: panix comp.lang.c++:1125027


I've been trying to create some custom system libraries with templating
and it surprised me when I starting to get linking problems. Generally I
create a .h file and a .cpp file and develop objects which can later be
developed into shared libraries. Years ago I did quite a bit of work
with C++ and libraries and I don't recall having this problem, but looking
back at the code, I see I was cramming a lot of class definitions directly
into the .h file. So I must have hit this snag before but I don't
remember it.

You'll have to excuse me if I sound a little vague on this problem I am
having, but it is very complicated and I'm slow at getting my head around
this issue. And it seems to affected somehow by name space.

I'm looking over the text by Vandevoorde and Josuttis, "C++ Templates The
complete guild, 12th printing in June of 2010 and copyrighted in 2003.
They seem to sum up the problem fairly well, although there explanation
is a bit cryptic to me. Section 6.1.1 and 6.1.2 on pages 63 after show
some sample code of a 3 file break out of C++ code they write:

A C++ compiler will most likely accept this program
without any problems, but the linker will probably
report an error, implying that there is no definition
for the function print_typeof()...

(adlib) for a common solution...
We include the defintions of a template in the header
file that declares that template.. For our example,
we can do this by adding

#include "myfirst.cpp"

at the end of myfirst.cpp in every do-C file that uses
the template. A third way, or course, is to do away
with myfirst.cpp and rewrite myfirst.hpp so that it
contains all template declarations and template
definitions.


Ugg. So I'm looking over old code that I wrote and it seems that
namespace influences the result of this, at least with gcc on GNU.

In this file here, I seem to be having no problem creating templated
objects in a .cpp file, but everything is being dumped the std namespace

http://www.nylxs.com/docs/workshops/linklist_templates/linklist.cpp.html

1 #include "linklist.h"
2 #include
3
4 using namespace std;
5
6 template
7 NODE::~NODE(){
8 //cout << "List Item Destroyed" << endl;
9
10 }
11
12
13
14
15 template
16 void LIST::remove_front(){
17 if(_at_front == 0){
18 cout << "No List" << endl;
19 return;
20 }
21 NODE * tmp = _at_front;
22 down_size();
23 _at_front = tmp->next();
24 if(tmp->next() == NULL)
25 _at_end = 0; //need to clear _at_end as well once
you delete the last node
26
27
28 delete tmp;
29 return;
30 }
31


The code I'm working on currently is less fortunate. I created a
namespace for it


~~nodes.cpp

#include "nodes.h"
#include
using namespace std;
template
tree::NODE::NODE( unk states, NODE *cl, NODE *cr, NODE
*p ){
cout << "Im here" << endl;
}

template
tree::NODE::~NODE(){
};
~~~~

|| g++ -Wall -ggdb -c nodes.cpp
nodes.cpp|5 col 1| error: ‘tree’ does not name a type
|| tree::NODE::NODE( unk states, NODE *cl, NODE *cr,
NODE *p ){
|| ^~~~
nodes.cpp|10 col 1| error: ‘tree’ does not name a type
|| tree::NODE::~NODE(){
|| ^~~~
make: *** [makefile|8| nodes.o] Error 1

before this, it was saying it couldn't find definitions of my templates
in this file. I did a circular thing and included, as per what it said
in the text,

#include node.cpp

in file node.h

/*
*
=====================================================================================
*
* Filename: nodes.h
*
* Description: description of phylogentic nodes as per
* Fitch and Sannkoff as describd by Felenstein
*
* Version: 1.0
* Created: Nov 4 21:15:49 EDT 2016
* Revision: none
* Compiler: gcc
*
* Author: Ruben Safir,
* Company: LIU Thesis
*
*
=====================================================================================
*/
#ifndef NODES_H
#define NODES_H
#include
#include
#include
#include "nodes.cpp"
namespace tree {


/*
==============================================================================
* Class NODE -
* Description - This is a node in the tree that must undergo parsimony
evaluation
*
================================================================================
*/


Now the namespace issue is cropping up.

--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Re: Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
filename*0="Re: Template Library files and Header linking troubles.eml"

Path: reader2.panix.com!panix!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "Alf P. Steinbach"
Newsgroups: comp.lang.c++
Subject: Re: Template Library files and Header linking troubles
Date: Sat, 5 Nov 2016 18:51:33 +0100
Organization: A noiseless patient Spider
Message-ID:
References:
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 5 Nov 2016 17:53:22 -0000 (UTC)
Injection-Info: mx02.eternal-september.org; posting-host="53e181cd2d791ebebf3babae72450b90";
logging-data="887"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX1/ufBOsf1MKIeKONJWvFNVg"
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
Thunderbird/45.4.0
In-Reply-To:
Cancel-Lock: sha1:1a3nljj4yhfeN8rziANmw0jMqoQ=
Xref: panix comp.lang.c++:1125031

On 05.11.2016 16:41, Popping mad wrote:
>
> I've been trying to create some custom system libraries with templating
> and it surprised me when I starting to get linking problems. Generally I
> create a .h file and a .cpp file and develop objects which can later be
> developed into shared libraries. Years ago I did quite a bit of work
> with C++ and libraries and I don't recall having this problem, but looking
> back at the code, I see I was cramming a lot of class definitions directly
> into the .h file. So I must have hit this snag before but I don't
> remember it.
[snip]
>
> Now the namespace issue is cropping up.
>

You don't have a namespace-related problem, or if you have one it's
unrelated.

The problem is simply that in order to instantiate a template with given
template arguments, the full textual definition must be available to the
compiler.

If you compile the template definitions separately, then you can only
instantiate them in the translation unit where you define them (because
here the textual definitions are available), and this means
instantiating them for a fixed number of possible types. They can be
used with these arguments in other TUs. But any other arguments, and the
linker will complain of lacking instantiations.

So usually templates are fully defined in headers.

E.g. much of Boost are template based header-only sub-libraries.


• • •

C++98 and C++03 had an `export` feature to deal with separate
compilation of template definitions.

Unfortunately, as I recall it was only ever implemented by Comeau and
(with an undocumented option to activate it) in the Intel compiler.

`export` was removed in C++11.

• • •

Rumours have long been that this will be fixed again “when” C++ gets
modules, and that's also rumoured to fix the extreme build times and
much else. E.g. Microsoft dismissed my suggestion of how to improve
build times because, hey, modules will fix all that. And Visual C++ does
have experimental module support already, but I don't know whether it
fixes build times, or deals with templates, or what.


Cheers & hth.,

- Alf


--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Re: Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="Re: Template Library files and Header linking troubles.eml"

Path: reader2.panix.com!panix!not-for-mail
From: ruben safir
Newsgroups: comp.lang.c++
Subject: Re: Template Library files and Header linking troubles
Date: Sat, 5 Nov 2016 14:49:22 -0400
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID:
References:
NNTP-Posting-Host: www.mrbrklyn.com
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: reader2.panix.com 1478371763 15672 96.57.23.82 (5 Nov 2016 18:49:23 GMT)
X-Complaints-To: abuse-at-panix.com
NNTP-Posting-Date: Sat, 5 Nov 2016 18:49:23 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.4.0
In-Reply-To:
Xref: panix comp.lang.c++:1125035

On 11/05/2016 01:51 PM, Alf P. Steinbach wrote:
> translation unit


what is that...exactly.

--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Re: Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="Re: Template Library files and Header linking troubles.eml"

Path: reader2.panix.com!panix!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ben Bacarisse
Newsgroups: comp.lang.c++
Subject: Re: Template Library files and Header linking troubles
Date: Sat, 05 Nov 2016 19:21:39 +0000
Organization: A noiseless patient Spider
Message-ID: <87wpghenr0.fsf-at-bsb.me.uk>
References:

Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: mx02.eternal-september.org; posting-host="2e1e84f92aba0f307ca14cc117644e08";
logging-data="32752"; mail-complaints-to="abuse-at-eternal-september.org"; posting-account="U2FsdGVkX19nDIzYAv49QyN6/xJik6uhaZz6/+p98hU="
Cancel-Lock: sha1:L1JyKVtQjRSmP2pGNbQm9EHB0Mc=
sha1:eWsLag8NjmrkP3VdtOyqtPVTAZc=
X-BSB-Auth: 1.dbb02969d7fb5aff009b.20161105192139GMT.87wpghenr0.fsf-at-bsb.me.uk
Xref: panix comp.lang.c++:1125038

ruben safir writes:

> On 11/05/2016 01:51 PM, Alf P. Steinbach wrote:
>> translation unit
>
> what is that...exactly.

"The text of the program is kept in units called source files in this
International Standard. A source file together with all the headers
(17.6.1.2) and source files included (16.2) via the preprocessing
directive #include, less any source lines skipped by any of the
conditional inclusion (16.1) preprocessing directives, is called a
translation unit."

--
Ben.

--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Re: Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="Re: Template Library files and Header linking troubles.eml"

Path: reader2.panix.com!panix!not-for-mail
From: Popping mad
Newsgroups: comp.lang.c++
Subject: Re: Template Library files and Header linking troubles
Date: Sat, 5 Nov 2016 20:28:05 +0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID:
References:
<87wpghenr0.fsf-at-bsb.me.uk>
NNTP-Posting-Host: www.mrbrklyn.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: reader2.panix.com 1478377685 16127 96.57.23.82 (5 Nov 2016 20:28:05 GMT)
X-Complaints-To: abuse-at-panix.com
NNTP-Posting-Date: Sat, 5 Nov 2016 20:28:05 +0000 (UTC)
User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT b8fc14e
git.gnome.org/git/pan2)
Xref: panix comp.lang.c++:1125043

On Sat, 05 Nov 2016 19:21:39 +0000, Ben Bacarisse wrote:

> ruben safir writes:
>
>> On 11/05/2016 01:51 PM, Alf P. Steinbach wrote:
>>> translation unit
>>
>> what is that...exactly.
>
> "The text of the program is kept in units called source files in this
> International Standard. A source file together with all the headers
> (17.6.1.2) and source files included (16.2) via the preprocessing
> directive #include, less any source lines skipped by any of the
> conditional inclusion (16.1) preprocessing directives, is called a
> translation unit."

By this definition, I'm not understanding what Mr Steinbach is saying.
These files are connected by #includes and should be visible to each
other at compile time, and yet when a template is created in a namespace
in the .h file, that namespace is not even being translated as a namespace
scope in the .cpp file even when they are cross #included to each other.

I don't know what it is doing or why.


--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Re: Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="Re: Template Library files and Header linking troubles.eml"

X-Received: by 10.13.254.71 with SMTP id o68mr9984ywf.156.1478383012964;
Sat, 05 Nov 2016 14:56:52 -0700 (PDT)
X-Received: by 10.157.45.170 with SMTP id g39mr14490otb.16.1478383012924; Sat,
05 Nov 2016 14:56:52 -0700 (PDT)
Path: reader2.panix.com!panix!bloom-beacon.mit.edu!bloom-beacon.mit.edu!168.235.88.217.MISMATCH!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!news.glorb.com!n6no1240162qtd.0!news-out.google.com!c26ni1212itd.0!nntp.google.com!q124no543060itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Sat, 5 Nov 2016 14:56:52 -0700 (PDT)
In-Reply-To:
Complaints-To: groups-abuse-at-google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.131.68.184;
posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 82.131.68.184
References:
<87wpghenr0.fsf-at-bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8fd740fc-af36-42d1-b0aa-96efe8fb8f44-at-googlegroups.com>
Subject: Re: Template Library files and Header linking troubles
From: =?UTF-8?B?w5bDtiBUaWli?=
Injection-Date: Sat, 05 Nov 2016 21:56:52 +0000
Content-Type: text/plain; charset=UTF-8
Xref: panix comp.lang.c++:1125046

On Saturday, 5 November 2016 22:28:13 UTC+2, Popping mad wrote:
> On Sat, 05 Nov 2016 19:21:39 +0000, Ben Bacarisse wrote:
>
> > ruben safir writes:
> >
> >> On 11/05/2016 01:51 PM, Alf P. Steinbach wrote:
> >>> translation unit
> >>
> >> what is that...exactly.
> >
> > "The text of the program is kept in units called source files in this
> > International Standard. A source file together with all the headers
> > (17.6.1.2) and source files included (16.2) via the preprocessing
> > directive #include, less any source lines skipped by any of the
> > conditional inclusion (16.1) preprocessing directives, is called a
> > translation unit."
>
> By this definition, I'm not understanding what Mr Steinbach is saying.
> These files are connected by #includes and should be visible to each
> other at compile time, and yet when a template is created in a namespace
> in the .h file, that namespace is not even being translated as a namespace
> scope in the .cpp file even when they are cross #included to each other.
>
> I don't know what it is doing or why.

You are too much describing how you are confused with something and your
feelings about it and so too few what you expect and what really happens.
Perhaps you can make a minimal full example that really does behave in
unexpected manner for you?

--------------A18A84B2A89E41FFC2077E56
Content-Type: message/rfc822;
name="Re: Template Library files and Header linking troubles.eml"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
filename*0="Re: Template Library files and Header linking troubles.eml"

Path: reader2.panix.com!panix!goblin2!goblin1!goblin.stu.neva.ru!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 05 Nov 2016 16:52:19 -0500
Date: Sat, 05 Nov 2016 23:52:14 +0200
From: Paavo Helde
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.8) Gecko/20151117 FossaMail/25.1.9
MIME-Version: 1.0
Newsgroups: comp.lang.c++
Subject: Re: Template Library files and Header linking troubles
References:
In-Reply-To:
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <3uadnWRenf4OyYPFnZ2dnUU78KnNnZ2d-at-giganews.com>
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-RPKmPdcEZGufb6gRHV/oxZ/HSAqYnw0KWYpGUIEVjVH3qIx3zPXwEI7bjtogCrqWcrGZf7rmqMx5fc8!QUZmBLYQVcPn8OxJu1Rn/6NkOFNcP4iutnmewdppM2TJIA62xF/LkAYKRFamEzEe36oeooOfvow=
X-Complaints-To: abuse-at-giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2179
Xref: panix comp.lang.c++:1125045

On 5.11.2016 17:41, Popping mad wrote:
> The code I'm working on currently is less fortunate. I created a
> namespace for it
>
>
> ~~nodes.cpp
>
> #include "nodes.h"
> #include
> using namespace std;
> template
> tree::NODE::NODE( unk states, NODE *cl, NODE *cr, NODE
> *p ){
> cout << "Im here" << endl;
> }
>
> template
> tree::NODE::~NODE(){
> };

> || g++ -Wall -ggdb -c nodes.cpp
> nodes.cpp|5 col 1| error: ‘tree’ does not name a type
> || tree::NODE::NODE( unk states, NODE *cl, NODE *cr,
> NODE *p ){
> || ^~~~

This is not a linker error.

Is the namespace called "tree"? If so, change this code to

#include "nodes.h"
#include
using namespace std;

namespace tree {

template NODE::NODE( unk states, NODE *cl,
NODE *cr, NODE
*p ){
cout << "Im here" << endl;
}

template
NODE::~NODE(){
};

}



--------------A18A84B2A89E41FFC2077E56
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Learn mailing list
Learn-at-nylxs.com
http://lists.mrbrklyn.com/mailman/listinfo/learn

--------------A18A84B2A89E41FFC2077E56--

  1. 2016-11-01 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] how is it indexing in cuda
  2. 2016-11-01 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Learn] not adequately speced of explained
  3. 2016-11-01 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] how is it indexing in cuda
  4. 2016-11-01 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] not adequately speced of explained
  5. 2016-11-02 Christopher League <league-at-contrapunctus.net> Re: [Learn] Fitch Algorithm - C++
  6. 2016-11-02 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fitch Algorithm - C++
  7. 2016-11-02 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] how is it indexing in cuda
  8. 2016-11-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fitch Algorithm - C++
  9. 2016-11-02 IEEE Computer Society <csconnection-at-computer.org> Subject: [Learn] Hear Google's John Martinis Take on Quantum Computing at
  10. 2016-11-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] opencl
  11. 2016-11-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] scheduled for tommorw
  12. 2016-11-02 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] threads tutorial
  13. 2016-11-03 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fitch Algorithm - C++
  14. 2016-11-03 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fitch Algorithm - C++
  15. 2016-11-03 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fitch Algorithm - C++
  16. 2016-11-03 Christopher League <league-at-contrapunctus.net> Re: [Learn] huffman code
  17. 2016-11-03 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] huffman code
  18. 2016-11-03 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Learn] huffman code
  19. 2016-11-03 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fitch algorithm from the beginning
  20. 2016-11-03 From: <mrbrklyn-at-panix.com> Subject: [Learn] huffman code
  21. 2016-11-03 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Phenology meeting
  22. 2016-11-03 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] relevant hackathon
  23. 2016-11-03 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] relevant hackathon
  24. 2016-11-04 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] huffman code
  25. 2016-11-04 Christopher League <league-at-contrapunctus.net> Subject: [Learn] Fitch/Sankoff
  26. 2016-11-05 Christopher League <league-at-contrapunctus.net> Re: [Learn] Fwd: templates within templates
  27. 2016-11-05 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: Re: const T vs T const
  28. 2016-11-05 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: Template Library files and Header linking troubles
  29. 2016-11-05 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: templates within templates
  30. 2016-11-06 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fwd: templates within templates
  31. 2016-11-06 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Fwd: templates within templates
  32. 2016-11-06 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fwd: templates within templates
  33. 2016-11-06 Christopher League <league-at-contrapunctus.net> Re: [Learn] Fwd: templates within templates
  34. 2016-11-06 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Fwd: templates within templates
  35. 2016-11-06 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Fwd: templates within templates
  36. 2016-11-06 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Fwd: templates within templates
  37. 2016-11-06 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] GNU Parallel 20161022 ('Matthew') released [stable]
  38. 2016-11-07 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] templates and ostream for future reference
  39. 2016-11-08 Christopher League <league-at-contrapunctus.net> Re: [Learn] C++ signature ambiguity
  40. 2016-11-08 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Learn] C++ signature ambiguity
  41. 2016-11-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] C++ signature ambiguity
  42. 2016-11-08 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: Invitation: Phylogeny meeting -at- Weekly from 10:15 to
  43. 2016-11-08 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Fwd: [nylug-talk] RSVP open: Wed Nov 16,
  44. 2016-11-09 Christopher League <league-at-contrapunctus.net> Re: [Learn] merge sort parallel hw
  45. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] merge sort parallel hw
  46. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] merge sort parallel hw
  47. 2016-11-09 Christopher League <league-at-contrapunctus.net> Re: [Learn] merge sort parallel hw
  48. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] mergesort tutorial
  49. 2016-11-09 Christopher League <league-at-contrapunctus.net> Re: [Learn] mergesort tutorial
  50. 2016-11-09 Christopher League <league-at-contrapunctus.net> Re: [Learn] namespace and external files confusion
  51. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] namespace and external files confusion
  52. 2016-11-09 From: "Carlos R. Mafra" <crmafra-at-gmail.com> Re: [Learn] Question about a small change
  53. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] =?utf-8?q?C++_call_of_overloaded_=E2=80=98track=28int*=26?=
  54. 2016-11-09 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: lost arguments
  55. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Dating origins of dinosaurs,
  56. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] merge sort parallel hw
  57. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] mergesort tutorial
  58. 2016-11-09 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] namespace and external files confusion
  59. 2016-11-10 Christopher League <league-at-contrapunctus.net> Re: [Learn] merge sort parallel hw
  60. 2016-11-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] merge sort parallel hw
  61. 2016-11-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] merge sort parallel hw
  62. 2016-11-10 Ruben Safir <ruben.safir-at-my.liu.edu> Re: [Learn] merge sort parallel hw
  63. 2016-11-10 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] [Hangout-NYLXS] mergesort tutorial
  64. 2016-11-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Fwd: [Hangout-NYLXS] ease your mind- everything in the
  65. 2016-11-10 Ruben Safir <ruben.safir-at-my.liu.edu> Subject: [Learn] Fwd: [Hangout-NYLXS] R Programming Workshop
  66. 2016-11-10 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Paleocast phenogenetic tree building
  67. 2016-11-11 Christopher League <league-at-contrapunctus.net> Re: [Learn] merge sort parallel hw
  68. 2016-11-12 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] HW of mergesort in parallel
  69. 2016-11-13 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] merge sort in parallel assignment
  70. 2016-11-14 Christopher League <league-at-contrapunctus.net> Re: [Learn] merge sort in parallel assignment
  71. 2016-11-14 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] merge sort in parallel assignment
  72. 2016-11-14 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] merge sort parallel hw
  73. 2016-11-14 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] CUDA and video
  74. 2016-11-14 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] PNG Graphic formats and CRCs
  75. 2016-11-15 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: PNG coding
  76. 2016-11-15 ruben safir <ruben.safir-at-my.liu.edu> Subject: [Learn] Fwd: PNG Coding
  77. 2016-11-16 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Fwd: lost arguments
  78. 2016-11-16 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] relevant hackathon
  79. 2016-11-16 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] C++ Workshop Announcement
  80. 2016-11-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [Learn] Fwd: Re: ref use
  81. 2016-11-16 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] ref use
  82. 2016-11-16 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] why use a reference wrapper int his example
  83. 2016-11-17 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] [Hangout-NYLXS] at K&R now
  84. 2016-11-17 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [Hangout-NYLXS] Fwd: PNG Coding
  85. 2016-11-18 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] C++ workshop and usenet responses
  86. 2016-11-19 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: ref use
  87. 2016-11-20 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] when is the constructor called for an object
  88. 2016-11-21 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: creating a binary tree
  89. 2016-11-21 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: hidden static
  90. 2016-11-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: ISBI 2017 Call for Abstracts and Non-Author
  91. 2016-11-21 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: PNG coding
  92. 2016-11-21 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: Re: the new {} syntax
  93. 2016-11-21 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: when is the constructor called for an object
  94. 2016-11-21 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: when is the constructor called for an object
  95. 2016-11-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Eoconfuciusornis feather keratin and
  96. 2016-11-21 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] look what I found
  97. 2016-11-22 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Cuccuency book
  98. 2016-11-22 ruben safir <ruben.safir-at-my.liu.edu> Subject: [Learn] declare a func or call an object
  99. 2016-11-22 Ruben Safir <ruben.safir-at-my.liu.edu> Subject: [Learn] Fwd: Re: Using CLIPS as a library
  100. 2016-11-23 Ruben Safir <ruben.safir-at-my.liu.edu> Subject: [Learn] Fwd: Simple C++11 Wrapper for CLIPS 6.30
  101. 2016-11-23 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Parrelel Programming HW2 with maxpath
  102. 2016-11-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] great research news for big data
  103. 2016-11-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] mapping algorithms
  104. 2016-11-24 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Todays meeting
  105. 2016-11-25 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: [dinosaur] Flightless theropod phylogenetic variation
  106. 2016-11-26 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Note to self for Thursday
  107. 2016-11-26 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fitch etc
  108. 2016-11-26 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Note to self for Thursday
  109. 2016-11-26 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] operator<<() overloading details and friend
  110. 2016-11-27 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] 130 year old feathers analysis
  111. 2016-11-27 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: ACM/SPEC ICPE 2017 - Call for Tutorial Proposals
  112. 2016-11-27 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: ACM/SPEC ICPE 2017 - Call for Workshop Proposals
  113. 2016-11-27 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: CfP 22nd Conf. Reliable Software Technologies,
  114. 2016-11-27 ruben safir <ruben-at-mrbrklyn.com> Subject: [Learn] Fwd: Seeking contributors for psyche-c
  115. 2016-11-29 Christopher League <league-at-contrapunctus.net> Re: [Learn] Look at this exciting output by my test program
  116. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Look at this exciting output by my test program
  117. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Re: [Learn] Look at this exciting output by my test program
  118. 2016-11-29 Christopher League <league-at-contrapunctus.net> Re: [Learn] Quantum Entanglement
  119. 2016-11-29 Ruben Safir <mrbrklyn-at-panix.com> Re: [Learn] Quantum Entanglement
  120. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Here is the paper I was talking out
  121. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Look at this exciting output by my test program
  122. 2016-11-29 nylxs <mrbrklyn-at-optonline.net> Subject: [Learn] Look at this exciting output by my test program
  123. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] Quantum Entanglement
  124. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] The Death of PBS
  125. 2016-11-29 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] witmer lab ohio and 3d imaging
  126. 2016-11-30 Ruben Safir <ruben-at-mrbrklyn.com> Subject: [Learn] phylogenetic crawler

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!