flat assembler
Message board for the users of flat assembler.

Index > Windows > compile error

Author
Thread Post new topic Reply to topic
Ali.Z



Joined: 08 Jan 2018
Posts: 737
Ali.Z 24 Mar 2020, 04:50
hey,

i just downloaded the:
flat assembler 1.73.22 for Windows
size: 1035 kilobytes
last update: 09 Feb 2020 9:35:36 UTC


and now whenever i try to compile anything it says: undefined symbol for every winapi call.
this problem happens when i use:
Code:
library kernel,'kernel32.dll'
include 'api\kernel32.inc'    


i had to manually construct the import section for every dll im using using:
dd 0,0,0,rva kernel_name,rva kernel_table
dd 0,0,0,0,0
kernel_table db 'kernel32.dll'
... rest of the import section ...

i also was able to use this format:
library kernel,'kernel32.dll'
import kernel,\
used func name, 'lib func name'
...


so is fasm1 broken or what?, seems i cant let fasm to automatically find and construct the import section for me!

_________________
Asm For Wise Humans
Post 24 Mar 2020, 04:50
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 24 Mar 2020, 04:55
Ali.Z wrote:
Code:
library kernel,'kernel32.dll'
include 'api\kernel32.inc'    


<…>

i also was able to use this format:
library kernel,'kernel32.dll'
import kernel,\
used func name, 'lib func name'

api\kernel32.inc relies on DLL being defined as kernel32:
Code:
library kernel32, 'kernel32.dll'    
Take a look at the file contents.
Post 24 Mar 2020, 04:55
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 737
Ali.Z 24 Mar 2020, 05:04
every function im using exist in kernel32.inc, i even tried to compile many older programs it just says undefined symbol for every winapi call.

even the most stupid function ExitProcess fasm says undefined symbol for it.
im not sure whats wrong, and constructing the import section manually is boring. (whether using dd ... rva or kernel/import pairs)

_________________
Asm For Wise Humans
Post 24 Mar 2020, 05:04
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20460
Location: In your JS exploiting you and your system
revolution 24 Mar 2020, 05:11
Did you try what DimonSoft showed?

library kernel32,...
Post 24 Mar 2020, 05:11
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 737
Ali.Z 24 Mar 2020, 05:16
yes, same weird issue ..

fasm exist on my computer since 2017 (before even joining the forums), same path same ini file .. same everything.

anyhow, i right-clicked fasmw.exe -> properties -> [previous versions] and restored the older version .. and now it works fine.

so weird.

_________________
Asm For Wise Humans
Post 24 Mar 2020, 05:16
View user's profile Send private message 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.