Posts: 369
Threads: 71
Joined: Jul 2022
Reputation:
14
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: 3,979
Threads: 177
Joined: Apr 2022
Reputation:
220
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!
b = b + ...
Posts: 369
Threads: 71
Joined: Jul 2022
Reputation:
14
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: 3,979
Threads: 177
Joined: Apr 2022
Reputation:
220
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.
b = b + ...
Posts: 3,979
Threads: 177
Joined: Apr 2022
Reputation:
220
I was forced to quit the program each time I tried it because the config could not be setup.
b = b + ...
Posts: 369
Threads: 71
Joined: Jul 2022
Reputation:
14
So the OK/Cancel box at the splash screen is in an endless loop??