Posts: 508
Threads: 105
Joined: Jul 2022
Reputation:
22
04-25-2023, 12:51 AM
(This post was last modified: 04-25-2023, 11:55 PM by eoredson.)
Ok, I replaced CreateFile with CreateFileA in Sub WriteConfig
Let me know if it works..
Erik.
If it does not work then I will delete the offending code.
Posts: 4,698
Threads: 222
Joined: Apr 2022
Reputation:
322
Still not compiling:
internal\c\c_compiler\bin\c++.exe -w -std=gnu++11 -DGLEW_STATIC -DFREEGLUT_STATIC -Iinternal\c\libqb/include -Iinternal\c/parts/core/src/ -Iinternal\c/parts/core/glew/include/ -DDEPENDENCY_IMAGE_CODEC -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE internal\c/qbx.cpp -c -o internal\c/qbx.o
internal\c\c_compiler\bin\objcopy.exe -Ibinary -Oelf64-x86-64 -Bi386:x86-64 internal\temp/data.bin internal\temp/data.o
In file included from internal\c/qbx.cpp:2349:
internal\c/../temp/main.txt: In function 'void SUB_MENU(qbs*, qbs*, qbs*, qbs*, qbs*)':
internal\c/../temp/main.txt:39245:18: error: cast from 'HANDLE' {aka 'void*'} to 'int32_t' {aka 'int'} loses precision [-fpermissive]
39245 | *__UOFFSET_HFIND=( int32 )CreateFileA((char*)(_SUB_MENU_STRING_G)->chr, 384 ,NULL,NULL, 1 ,NULL,NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internal\c/../temp/main.txt: In function 'void SUB_WRITECONFIG()':
internal\c/../temp/main.txt:58540:32: error: cast from 'HANDLE' {aka 'void*'} to 'int32_t' {aka 'int'} loses precision [-fpermissive]
58540 | *_SUB_WRITECONFIG_OFFSET_HFIND=( int32 )CreateFileA((char*)(_SUB_WRITECONFIG_STRING_F)->chr, 384 ,NULL,NULL, 2 ,NULL,NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make: *** [Makefile:417: internal\c/qbx.o] Error 1
Man that is allot of work gone into that code!
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 508
Threads: 105
Joined: Jul 2022
Reputation:
22
04-25-2023, 05:58 AM
(This post was last modified: 04-26-2023, 10:03 PM by eoredson.)
Ok, that did not work.
I am deleting the relevant code now.
From what I can tell the compiler is throwing up an error in both CreateFile and CreateFileA in Sub Menu And Sub WriteConfig. I have corrected this.
Posts: 4,698
Threads: 222
Joined: Apr 2022
Reputation:
322
Compiled but having trouble with Config filename it appears.
Looks like your program has taken over error handling and exiting and wanting to write stuff in Windows restricted area. I'm out.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,698
Threads: 222
Joined: Apr 2022
Reputation:
322
I was forced to quit the program each time I tried it because the config could not be setup.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,698
Threads: 222
Joined: Apr 2022
Reputation:
322
(04-26-2023, 08:53 PM)eoredson Wrote: (04-26-2023, 11:57 AM)bplus Wrote: I was forced to quit the program each time I tried it because the config could not be setup.
That's vague. When you say "config file could not be setup" what do you mean?
Could you be more specific? Does it display an error number or an error line?
I mean I get the try again or quit dialogue from your program, and doesn't matter how many times I try again I get dialog back until I quit.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 508
Threads: 105
Joined: Jul 2022
Reputation:
22
So the OK/Cancel box at the splash screen is in an endless loop??