flat assembler
Message board for the users of flat assembler.
Index
> Windows > Symbol already defined errors |
Author |
|
lostcauz 27 Mar 2012, 12:33
What's the correct method for declaring a control array? I keep getting symbol already defined errors with my attempts.
Code: hwndEdit dd 12 dup (?) |
|||
27 Mar 2012, 12:33 |
|
gunblade 27 Mar 2012, 12:35
Why not:
Code:
hwndEdit rd 12
|
|||
27 Mar 2012, 12:35 |
|
gunblade 27 Mar 2012, 12:43
Actually, yeah, what rev says. The code in my post does the same as yours, only slightly different, but wouldnt solve the symbol already defined error. The only benefit with the way that i'm doing it is that if you put it in the right section, you can save yourself from adding those extra 12 bytes to the executable, and instead it will allocate them from memory at load-time (is it .bss in windows too?)..
Anyway, yeah, you must be defining this variable more than once.. are you trying to use it inside a macro which you are using multiple times? |
|||
27 Mar 2012, 12:43 |
|
lostcauz 27 Mar 2012, 12:50
gunblade, I already tried that one too.
revolution, I checked again to be sure. No other definitions. I assume the error is from this definition but the error only states: Code: label dd RVA _label
error: symbol already defined.
I'm tired and confused. Maybe the issue is how I am accessing the array to create the controls. |
|||
27 Mar 2012, 12:50 |
|
gunblade 27 Mar 2012, 12:56
Hmm.. pretty sure label is a reversed keyword.. have you tried changing that to label2 or some other word..?
EDIT: Yeah.. just tested it - you deffinetly cant use the word label.. its a keyword used by fasm. if you change your code to: Code: label2 dd RVA _label it should work fine |
|||
27 Mar 2012, 12:56 |
|
revolution 27 Mar 2012, 13:03
lostcauz: Post your code please. We can't help you without more information.
|
|||
27 Mar 2012, 13:03 |
|
lostcauz 27 Mar 2012, 13:06
That's from import32.inc
Code: flat assembler version 1.69.50 (1023795 kilobytes memory) \api\user32.inc [4]: import user32,\ import32.inc [50] import [24]: label dd RVA _label error: symbol already defined. Does anyone have an example of creating a control array so I can resolve the issue in my code? |
|||
27 Mar 2012, 13:06 |
|
gunblade 27 Mar 2012, 13:10
Oh..
Yeah.. label is used as a parameter to a macro in that context, so thats ok - it seems like you may be using the import macro wrongly.. It would help to see your code, at the very least the final '.idata' section containing the library/import code. Last edited by gunblade on 27 Mar 2012, 13:41; edited 1 time in total |
|||
27 Mar 2012, 13:10 |
|
revolution 27 Mar 2012, 13:12
lostcauz: You have defined a label the same as one of the API functions. Perhaps you could post your code?
|
|||
27 Mar 2012, 13:12 |
|
lostcauz 27 Mar 2012, 13:37
Thanks revolution! That statement about the api tipped me off. I changed the name of one of my procs and it assembles fine. Although, it appears I still have issues since the edit controls are not showing up. I'm just thankful it assembled.
I appreciate the help! |
|||
27 Mar 2012, 13:37 |
|
typedef 28 Mar 2012, 03:57
revolution wrote: lostcauz: You have defined a label the same as one of the API functions. Perhaps you could post your code? Every time you have to repeat the same thing just so some newbie can understand you. I feel ya ! I guess it's hard being a mod(although it could apply to anyone with a different profile), perhaps. Is it? Tell me rev... Is there like a "read this before you post questions" sticky thread ? |
|||
28 Mar 2012, 03:57 |
|
revolution 28 Mar 2012, 05:07
typedef wrote: Every time you have to repeat the same thing just so some newbie can understand you. I feel ya ! typedef wrote: I guess it's hard being a mod(although it could apply to anyone with a different profile), perhaps. Is it? Tell me rev... typedef wrote: Is there like a "read this before you post questions" sticky thread ? |
|||
28 Mar 2012, 05:07 |
|
typedef 28 Mar 2012, 09:13
revolution wrote: You are welcome to help newcomers also. Modship is not a requirement for helping people The thing with me is that I have a tendency of trying to provide the whole solution to newbies. But that's how I deepen my skills also. Maybe I should take it easy then. |
|||
28 Mar 2012, 09:13 |
|
lostcauz 28 Mar 2012, 13:02
typedef wrote:
Some newbie? I suppose you mean new to fasm. Your post adds nothing to this discussion. BTW, did you ever figure out how to assemble the other program I posted that everyone else was able to run? |
|||
28 Mar 2012, 13:02 |
|
typedef 28 Mar 2012, 20:03
lostcauz wrote:
Holy mother of ass broah ! hahahaha. Get over yourself I have no interest in that program or whatever shizzle it does. Sorry if I have been unwelcoming because I made your program compile to 11mb . Cheer up son. Good days are always ahead |
|||
28 Mar 2012, 20:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.