NO

Author Topic: Pelles c version 10  (Read 7180 times)

Offline risanchez

  • Member
  • *
  • Posts: 5
Pelles c version 10
« on: December 01, 2020, 11:06:43 PM »
In version 10 of Pelles c I can not return a function from within another function, always get this:
fatal error: Internal error: 'Access violation' at 0x00007ff7b3897b6a.

This did not happen in version 9. Also I run my program in Visual Studio and compile and run ok.
Anybody, please kown how to solve this problem, if smobody face the same problem?
Thanks

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Pelles c version 10
« Reply #1 on: December 02, 2020, 12:54:00 AM »
Not clear what you mean.
The error is from the compiler or from your code?
Post your code, a small sample that shows the problem.
« Last Edit: December 02, 2020, 12:55:54 AM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Grincheux

  • Guest
Re: Pelles c version 10
« Reply #2 on: December 05, 2020, 06:58:38 PM »
I never met this problem.

Offline MrBcx

  • Global Moderator
  • Member
  • *****
  • Posts: 189
    • Bcx Basic to C/C++ Translator
Re: Pelles c version 10
« Reply #3 on: December 05, 2020, 07:45:08 PM »
In version 10 of Pelles c I can not return a function from within another function, always get this:
fatal error: Internal error: 'Access violation' at 0x00007ff7b3897b6a.

This did not happen in version 9. Also I run my program in Visual Studio and compile and run ok.
Anybody, please kown how to solve this problem, if [somebody] face the same problem?
Thanks

You need to post a small example that demonstrates the error.  Otherwise, it is impossible to know
what problem needs to be solved. 
Bcx Basic to C/C++ Translator
https://www.BcxBasicCoders.com

Grincheux

  • Guest
Re: Pelles c version 10
« Reply #4 on: December 05, 2020, 08:27:09 PM »
Is it like this :

Code: [Select]
lstrcpyA(szStringC,lstrcpyA(szStringA,szStringB)) ;
or

Code: [Select]
UpdateWindow(CreateWindowA(szProgramClass,szProgramTitle,
      WS_BORDER|WS_CAPTION|WS_SYSMENU|WS_POPUP,
      0,0,800,400,NULL,NULL,hInstance,NULL)) ;

Offline John Z

  • Member
  • *
  • Posts: 860
Re: Pelles c version 10
« Reply #5 on: December 05, 2020, 09:17:44 PM »
Hi,

Quite possibly this is related to this bug report:
https://forum.pellesc.de/index.php?topic=9770.msg32753#msg32753

To see if it is, try adding some additional parenthesis like

Code: [Select]
lstrcpyA(szStringC,(lstrcpyA(szStringA,szStringB))) ;

see if that helps. 
Otherwise you need to breakout the internal result into a variable and use that in the function.

John Z

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide