QB64 Phoenix Edition
The Hexeditor project - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Utilities (https://qb64phoenix.com/forum/forumdisplay.php?fid=8)
+---- Thread: The Hexeditor project (/showthread.php?tid=805)

Pages: 1 2 3 4 5


RE: The Hexeditor project - eoredson - 04-24-2023

It seems the error is in Sub WriteConfig according to the compiler error list at:


Quote:
Code: (Select All)
SUB_WRITECONFIG_OFFSET_HFIND=(  int32  )CreateFile((char*)(_SUB_WRITECONFIG_STRING_F)->chr, 384 ,NULL,NULL, 2 ,NULL,NULL);


I could remove it completely or try to fix it.


RE: The Hexeditor project - eoredson - 04-25-2023

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.


RE: The Hexeditor project - bplus - 04-25-2023

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!


RE: The Hexeditor project - eoredson - 04-25-2023

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.


RE: The Hexeditor project - bplus - 04-25-2023

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.


RE: The Hexeditor project - eoredson - 04-26-2023

Quote:Compiled but having trouble with Config filename it appears.


So, are you declaring the program works and the compiler bug is squashed or are you having problems with the config file?


Quote:Looks like your program has taken over error handling and exiting and wanting to write stuff in Windows restricted area.


The program is supposed to.

Erik.


RE: The Hexeditor project - bplus - 04-26-2023

I was forced to quit the program each time I tried it because the config could not be setup.


RE: The Hexeditor project - eoredson - 04-26-2023

(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?


RE: The Hexeditor project - bplus - 04-26-2023

(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.


RE: The Hexeditor project - eoredson - 04-26-2023

So the OK/Cancel box at the splash screen is in an endless loop??