Login  Register

Re: [Quantlib-dev] Trouble getting QuantLibAddin to work with vc 7.1

Posted by Plamen Neykov on May 18, 2005; 4:32am
URL: http://quantlib.414.s1.nabble.com/Trouble-getting-QuantLibAddin-to-work-with-vc-7-1-tp3778p3780.html

On Wednesday 18 May 2005 11:41, eric ehlers wrote:

> On 5/17/05, Plamen Neykov <[hidden email]> wrote:
> > Hi All,
> >
> > I'm having considerable trouble to get the QuantLibAddin (the Excel
> > add-in) to work. I'm using vc 7.1 and the add-in is crashing exactly as
> > described in Microsoft Knowledge Base Article ID 198477
> > ( http://support.microsoft.com/kb/198477 ) It is crashing in TempStr as
> > it tries to change the first character of a string. I've for sure changed
> > in all projects the /ZI switch to /Zi and rempiled everything but still
> > have the same problem. Strange is that the add-in crashes also in the
> > release config (as by microsoft this should occur only with the debug
> > config). Does anyone know how to get this problem solved?
> >
> > Thanks in advance
> > Plamen
>
> Hi Plamen
>
> I'm not aware of a situation where the modification of a literal
> string causes an access violation in the absence of string pooling
> (/ZI, /GF).
>
> You could try visiting http://office.microsoft.com and installing any
> available bugfixes for your copy of Excel.
>
> Some other thoughts -
> - QuantLibAddin ships the Excel project with string pooling disabled
> and it shouldn't be necessary to disable it in related projects
> - You should be using QuantLib 0.3.9 plus the latest CVS snapshots of
> ObjectHandler and QuantLibAddin
> - For ObjectHandler and QuantLibAddin the VC7/8 workspaces are updated
> only for releases, when using VC7 against a CVS snapshot you should
> upgrade the VC6 workspace.
>
> Regards,
> Eric
Hi Eric,

unfortunately the following program crashes also exactly in the same way as
the add-in:

#include <iostream>
int main(int argc, char* argv[])
{
        char* p = "Test";
        p[0] = 'P';
        std::cout << p;
        return 0;
}

It doesn't matter which compiler switches I use to compile it - either in the
ide or via the command line. It crashes even if I compile it like that:
cl Test.cpp
My compiler version is 13.10.3077

It seems to me that my compiler is placing string literals _allways_ in
readonly memory disregarding the compiler switches I use .....

Thanks & Regards
Plamen

attachment0 (189 bytes) Download Attachment