Page 1 of 1

Bug compiling

Posted: Thu Oct 21, 2010 9:16 pm
by Stix
I get this error while compiling the new build. Never got this before.

Code: Select all

M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(833) : error C2374: 'nPack' : redefinition; multiple initialization
        M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(781) : see declaration of 'nPack'
M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(1184) : error C2374: 'nPack' : redefinition; multiple initialization
        M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(1124) : see declaration of 'nPack'
MQ2DataAPI.cpp
Am Using C++ 6.0

Thanks

Re: Bug compiling

Posted: Thu Oct 21, 2010 9:48 pm
by ieatacid
Stix wrote: Am Using C++ 6.0
Therein lies your problem :)

Re: Bug compiling

Posted: Thu Oct 21, 2010 11:03 pm
by yuli
Downloading the correct compiler . Thanks for all you do.

Re: Bug compiling

Posted: Thu Oct 21, 2010 11:21 pm
by dewey2461
There are two instances where the for loops have in line declared variables.

Code: Select all

   
    for (unsigned long nPack = 0 ; nPack < NUM_BANK_SLOTS ; nPack++)



need to remove the unsigned long and move it outside to the top of the first loop.

Code: Select all

    unsigned long nPack;
    for (nPack=0 ; nPack < NUM_BANK_SLOTS ; nPack++)
    {
          .....
    }

    for (nPack=0 ; nPack < NUM_BANK_SLOTS ; nPack++)
    {
          .....
    }

    

Re: Bug compiling

Posted: Thu Oct 21, 2010 11:45 pm
by dont_know_at_all
fixed in next zip.

Re: Bug compiling

Posted: Wed Jan 14, 2026 8:55 am
by xyilla