Menu

Problem with my code or problem with generated C code

wmealing
2023-06-16
2023-06-17
  • wmealing

    wmealing - 2023-06-16

    $ cobc simple.cbl -lcurl

    /var/folders/tk/dqq2xt2x61v01mqlsz2wdr3h0000gn/T//cob77198_0.c:144:5:
    error: use of undeclared identifier 'temptr'
    temptr = ((void ()(void))call_curl_easy_init.funcptr) ();
    ^
    /var/folders/tk/dqq2xt2x61v01mqlsz2wdr3h0000gn/T//cob77198_0.c:147:19:
    error: use of undeclared identifier 'temptr'
    memcpy (b_8, &temptr, 8);
    ^
    My cobol skills are basic at best, i've attached the source of
    simple.cbl and the generated c file. I had expected this to throw an
    error in
    how I've written cobol incorrectly rather than an error in the C.

    What should I have done differently ?

    Thanks in advance.

    --
    Wade Mealing

     
  • Simon Sobisch

    Simon Sobisch - 2023-06-16

    all fine, you've just hit [bugs:#785], so the only option for now would be to switch to a nightly snapshot instead of 3.1.2 (or apply the referenced patch)

     

    Related

    Bugs: #785


    Last edit: Simon Sobisch 2023-06-16
  • wmealing

    wmealing - 2023-06-16

    Ah, thanks. I'll try that.

     
  • wmealing

    wmealing - 2023-06-17

    Can confirm, this solved the problem.

     

Anonymous
Anonymous

Add attachments
Cancel