Re: Zero-link
Re: Zero-link
- Subject: Re: Zero-link
- From: "Kyle Sluder" <email@hidden>
- Date: Thu, 11 Oct 2007 13:18:13 +0100
The templating engine failed to create an instance of the template for
your class, probably because you didn't implement a copy constructor
or some such. Without the actual error message, we can't really do
much.
--Kyle Sluder
On 10/10/07, Phil Hystad <email@hidden> wrote:
> Gang,
>
> I have been working on a project with zero-link enabled but this
> morning something unusual happened.
>
> A test program failed on zero-link due to a missing class member
> function which I just haven't gotten around to writing yet. The
> mystery though is that my main program had no reference to any part
> of that particular class. No header include file was referenced, no
> other references to the class were specified in the file. In fact, I
> was doing some experiments with the <vector> template class with
> integers ( vector<int> ) when this zero-link missing external error
> message occurred.
>
> Basically, I had the following code in my main:
>
> int main()
> {
> vector<int> vec1;
>
> // a bunch of couts on various members such as size(), max_size(),
> etc that do not reference
> // individual elements.
>
> return 0;
> }
>
>
> That program worked just fine as I was just setting up to do some
> other things. So, I modify this program in the following manner by
> inserting the following statements (after the comment lines
> in the above example).
>
> vec1.push_back(1);
> vec1.push_back(2);
> vec1.push_back(3);
>
> At this point, when I compiled and ran the program, the zero link
> error was reported on a class method that was not even referenced.
> Indeed, the only thing about this particular class is that it does
> indeed have a reference to something like: vector<MyClass*> but
> that is the only connection.
>
> Now, my particular project does include a number of other files that
> do contain these classes and references to them but they are not
> executed in this particular test. In this test, I am only executing
> the main() that I show above.
>
> So, can anyone explain why I am getting this zero-link error. Note,
> if I copy the main program totally and build it in another project
> that does not include any of my other files then it works as I expect
> without any errors.
>
> phil
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Zero-link (From: Phil Hystad <email@hidden>) |