Qbasicnews.com

Full Version: Can't finish kernel32.bi because of a compiler bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
There seems to be a bug.
The kernel32.bi has a constant named mouse_event, and user32.bi has a sub called mouse_event.
The compiler says: Duplicated definition.

Also the SECURITY_ATTRIBUTES structure seems also to be used by kernel32.bi, not nly user32.bi.
I'll move SECURITY_ATTRIBUTES into win32types.bi ASAP. Big Grin

kernel32 contains mouse_event? Weird...? Well, I don't even know what they do, but perhaps they can be aliased as something else, such as:
Code:
Declare Function mouse_event_user32 Lib "user32" Alias "mouse_event"
What about instead of having 2 win files for constants and structures having only ONE and call it 'winbase' like with some c compiler?
Just a thought.

BTW: in kernel32 is beep and it's also an internal command.
Tried to make winbeep and alias it to beep from kernel32 but it's always the same error (duplicated...).

Also I had to comment a few stuff in user32...

If you want I could upload what I have right now (~120kb) so you can take a look at it.
Like I said before, never worked with QB or VB before, only basic-style languages... and some c
Cry
That could work...I'll do that. Big Grin

It's possible that the Beep in FB wraps the kernel32 Beep (I've never looked at the FB sourcecode, I'm just theorizing based on logic), so I would think that you could just leave it out of the inclusion anyways.

I'll make the revisions after Rhiannon and I get home from our day's work and have it uploaded tonight to my server.
Also I would like to suggest to move all Windows-OS related includes in a separate directory (like SDL & GL already have).

This way we could also have a Linux dir and OSX dir etc.
Just a thought, because it would make things more cleaner.
(Don't know about the lib folder though...)
Just uploaded kernel32.bi to:
http://fbtk.qbtk.com/phpBB2/viewtopic.php?t=23
(not ready for the masses yet)
Don't have time to work on it today and tomorrow, so edit the file as you need.
Not a bug, you can't have a constant and a function or variable with the same name.. all symbols are case-insensitive also.. QB-ish..
Okay, new user32.bi, gdi32.bi, and winbase.bi files uploaded. I'll see what I can get finished on your kernel32.bi tonight.

EDIT: I'm looking at the export table for kernel32, and I don't see a mouse_event anywhere in it. :???: Your kernel32.bi is pretty advanced, though. Big Grin
Uploaded new kernel32.bi based on yours. Found the problem with mouse_event though...you've got it as a constant in kernel32.bi. I'll rename the constant set so everything works properly.

EDIT: Fixed. Big Grin
Quote:Not a bug, you can't have a constant and a function or variable with the same name.. all symbols are case-insensitive also.. QB-ish..
ok thanks, I try to keep in mind.

Adosorken renamed the constant to: EVT_MOUSE_EVENT
so no problems here anymore Tongue

8)
Pages: 1 2