← Back to team overview

kicad-developers team mailing list archive

Re: Re: PCB Layer Stackup UI

 

Dick Hollenbeck wrote:
> stambaughw wrote:
>> --- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:
>>
>> <<< snipped >>>
>>
>> 
>>> If we go this way, instead of committing to an unlimited number of 
>>> layers, lets limit it to some number <=255, that way we can hold your 
>>> layer numbers in a uint8_t byte array. Specctra DSN has a limit of 255 
>>> layers also. Maybe we could use bit 7 of the layer number as the 
>>> non-copper flag. This way we could handle 128 non copper layers and 127 
>>> copper layers.
>>> 
>> Dick,
>>
>> FYI. stdint.h is not defined in MS VC++ so using uint8_t will not compile. wxUInt8 is defined in <wx/defs.h> so that may be a more portable solution. I haven't seen an equivalent in Boost either. I have seen a version of stdint.h for MS VC++ on the internet but I'm not sure of the quality or how portable it is between the different versions of VC++.
>>
>> 
> 
> Thanks.

I already made that mistake for you. I hate see you write a lot of code
only to have to go back an fix it to accommodate VC++.

> Bend over, Microsoft is coming.
> 
> BTW, WFT is VC++ and why do I care?

I knew that was coming:). Unfortunately, I can't see not supporting for
the foreseeable future. I'll sure be glad when that future arrives
though. I think stdint.h is part of the ISO C99 spec. Ten years later
and Microsoft still can't make an ISO C compliant compiler.

> typedef unsigned long long uint64_t;
> 
> can the P.o.S. compile that?

Yes, but you may what to use CMake to perform a compiler check to make
sure long long is actually 64 bits. Otherwise, you may run into some
unexpected surprises. wxUint64 is defined in wxWidgets so that may save
you some grief.

Wayne

 




References