Boost logo

Boost Users :

Subject: Re: [Boost-users] [units] Creating a velocity unit
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-02-25 19:24:28


AMDG

On 02/25/2013 04:16 PM, Ryan wrote:
> Steven,
>
> I didn't notice I was getting a linking error for the following code that
> we discussed. It compiles fine but has an "unresolved external symbol" for
> the following.
>
> class A
> {
> static const metric::nautical_mile_base_unit::unit_type nautical_miles;
> static const metric::hour_base_unit::unit_type hours;
> static const decltype(nautical_miles / hours) nautical_miles_per_hour;
> };
>
> If I move these lines outside the class everything compiles and links fine.
> What am I missing here?
>

at namespace scope in A.cpp:

const metric::nautical_mile_base_unit::unit_type A::nautical_miles;
...

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net