flat assembler
Message board for the users of flat assembler.

Index > Windows > ms link problems

Author
Thread Post new topic Reply to topic
Timmy



Joined: 09 Aug 2004
Posts: 1
Timmy
ok,

im having a few problems Sad im no professional at assembly, im only using it for convenience (as i already have partial source code written)

i now require to use a lib from masm32 (but i dont have source)

i wish to import the functions from x.lib similar to includelib 'x.lib' in masm32.

ive read through the forum, and found posts saying about vortex software (which is really nice) and also about ms-link.zip ... somewhere i found the download link for it on this forum (so others just search forum for it).

i put every file in their correct directories, - and tried to compile the 'example' that came with it, only to be faced with this error message :

Code:
D:\mslink\Fasm>set include=fasmw\include

D:\mslink\Fasm>..\scan template.asm -a

D:\mslink\Fasm>fasm\fasm template.asm template.obj
flat assembler  version 1.54
3 passes, 1336 bytes.

D:\mslink\Fasm>masm32\bin\link /ENTRY:start /SUBSYSTEM:WINDOWS template.obj ..\k
ernel32.lib ..\user32.lib
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

template.obj : error LNK2001: unresolved external symbol __imp_ExitProcess
template.obj : error LNK2001: unresolved external symbol __imp_GetModuleHandleA
template.obj : error LNK2001: unresolved external symbol __imp_CreateWindowExA
template.obj : error LNK2001: unresolved external symbol __imp_DefWindowProcA
template.obj : error LNK2001: unresolved external symbol __imp_DispatchMessageA
template.obj : error LNK2001: unresolved external symbol __imp_GetMessageA
template.obj : error LNK2001: unresolved external symbol __imp_LoadCursorA
template.obj : error LNK2001: unresolved external symbol __imp_LoadIconA
template.obj : error LNK2001: unresolved external symbol __imp_PostQuitMessage
template.obj : error LNK2001: unresolved external symbol __imp_RegisterClassA
template.obj : error LNK2001: unresolved external symbol __imp_TranslateMessage
template.exe : fatal error LNK1120: 11 unresolved externals
    


im curious as to what im doing wrong Sad i have seen these errors in delphi/ms c++ - and they were relatively easy to fix (i seem to remember)

as far as i can see, i have done nothing wrong, the example should be working?

Thanks for any response

Tim
Post 09 Aug 2004, 09:27
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2141
Location: Estonia
Madis731
I have only used the FASMW version so I can't tell you how to fix it, but seems that you have not declared these in your source, like:
Code:
 library kernel,'KERNEL32.DLL',user,'USER32.DLL'
 import  kernel, \
GetModuleHandle,'GetModuleHandleA', \
ExitProcess,'ExitProcess', \
etc.
 import  user, \
MessageBox,'MessageBoxA', \
and so on
    

because some includes want you to specifically declare the library imports
you're using in your program.
Post 09 Aug 2004, 09:34
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex
Hi Timmy,

Welcome to the forum.

Are you sure that you are using the correct import libraries? As you know, Fasm emits differently external functions names, not like Masm as __imp__MessageBoxA@4

To build import libraries without decorated names, have a look at this thread:
Linking Fasm object files with MS Link

http://board.flatassembler.net/topic.php?t=479

If still the problem continues, can you post your files as a zip attachment to the board?

_________________
Code it... That's all...
Post 09 Aug 2004, 10:32
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.