flat assembler
Message board for the users of flat assembler.

Index > Windows > Error symbol already defined

Author
Thread Post new topic Reply to topic
catafest



Joined: 05 Aug 2010
Posts: 129
catafest 28 Jan 2011, 10:33
I got this error
Code:
Error symbol already defined     

this symbol is not use in my program :
Code:
SYSTEM_INFO.wProcessorArchitecture dw ?    

What happen ?
Thank you .
Post 28 Jan 2011, 10:33
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20457
Location: In your JS exploiting you and your system
revolution 28 Jan 2011, 10:41
Show your code. We have no idea what you have done.
Post 28 Jan 2011, 10:41
View user's profile Send private message Visit poster's website Reply with quote
catafest



Joined: 05 Aug 2010
Posts: 129
catafest 28 Jan 2011, 11:36
Is huge .
I try to add a dialog proc .
I think is this :
Code:
include 'win32ax.inc'    

or
Code:
invoke  GetOpenFileName,s_OFN    

with
Code:
       ofn_szOutFile db 256 dup(?) 
       ofn_szFilter  db 'All Files (*.*)',0,'*.*',0,0   
       s_OFN OPENFILENAME  \
0,0,0,ofn_szFilter,0,0,0,ofn_szOutFile,0100h,0,0,0,0,OFN_FILEMUSTEXIST +\
OFN_PATHMUSTEXIST, 0,0,0,0,0,0         
    

Because if i get out from source , see
Code:
 ; include 'win32ax.inc'    

then fasm has problem with
Code:
call[GetOpenFileName]    
from proc32.asm
Post 28 Jan 2011, 11:36
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20457
Location: In your JS exploiting you and your system
revolution 28 Jan 2011, 11:46
Nope, it is not that.

You might have included "KERNEL32.INC" twice. Or maybe "WIN32A.INC" twice. Hard to know when you don't post the code.
Post 28 Jan 2011, 11:46
View user's profile Send private message Visit poster's website Reply with quote
catafest



Joined: 05 Aug 2010
Posts: 129
catafest 28 Jan 2011, 18:43
I use fpaste site .
This is the code test i try . http://fpaste.org/QDhr/
I think I need some tutorials to start correct way with fasm...
I try to put together examples and try to see the best method of writing a program fasm.
For example, I saw that the skeleton source code is:
Code:
format PE GUI 4.0
entry start
include 'win32a.inc'
...
section '.data' data readable writeable 

section '.code' code readable executable

  start:
proc WindowProc hwnd,wmsg,wparam,lparam  
  finish:
        pop     edi esi ebx
        ret
endp  
...
section '.idata' import data readable writeable

  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL',\
          gdi,'GDI32.DLL'

  import kernel,\
         GetModuleHandle,'GetModuleHandleA',\
         ExitProcess,'ExitProcess'  
section '.rsrc' resource data readable  
  icon main_icon,icon_data,'minipad.ico'

  versioninfo version,VOS__WINDOWS32,VFT_APP,VFT2_UNKNOWN,LANG_ENGLISH+SUBLANG_DEFAULT,0,\
              'FileDescription','Eazy Edit - simple editor program',\
              'LegalCopyright','Rights reserved.',\
              'FileVersion','1.0',\
              'ProductVersion','1.0',\
              'OriginalFilename','Eazy Edit.EXE' 
    

This is correct ?
It is absolutely necessary for a Windows application that?
Code:
  versioninfo version,VOS__WINDOWS32,VFT_APP,VFT2_UNKNOWN,LANG_ENGLISH+SUBLANG_DEFAULT,0,\
              'FileDescription','Eazy Edit - simple editor program',\
              'LegalCopyright','Rights reserved.',\
              'FileVersion','1.0',\
              'ProductVersion','1.0',\
              'OriginalFilename','Eazy Edit.EXE' 
    

Thank you .
Post 28 Jan 2011, 18:43
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20457
Location: In your JS exploiting you and your system
revolution 28 Jan 2011, 19:22
You need to "import" the comdlg32.inc stuff to define the "GetOpenFileName" label.

Plus your "AA" label breaks the local label definitions further below. Consider changing it to ".AA".

Plus lots more errors you will discover when you fix these two things.
Post 28 Jan 2011, 19:22
View user's profile Send private message Visit poster's website Reply with quote
catafest



Joined: 05 Aug 2010
Posts: 129
catafest 28 Jan 2011, 19:50
Yes ! Right
Is two dialogs :
Code:
    GetOpenFileName,\
    GetSaveFileName,\     

and i think is need to create 2 proc for each dialog Open and Save file .
Post 28 Jan 2011, 19:50
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.