flat assembler
Message board for the users of flat assembler.

Index > Windows > Fasm how to compile the static library .lib file

Author
Thread Post new topic Reply to topic
CFasm



Joined: 04 Dec 2015
Posts: 4
CFasm 08 Apr 2017, 14:44
Fasm how to compile the static library .lib file

I need to use fasm call a vc compiler static library file. in a function how to achieve?
Post 08 Apr 2017, 14:44
View user's profile Send private message Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Trinitek 08 Apr 2017, 16:31
You're going to want to write your FASM module as a COFF object, where you will use the 'extrn' directive to prototype the library functions you need. Then, link the produced COFF object file with the library using your toolchain's linker.

See http://flatassembler.net/docs.php?article=manual#2.4.3 and also see the MSCOFF example in the examples folder.
Post 08 Apr 2017, 16:31
View user's profile Send private message Reply with quote
CFasm



Joined: 04 Dec 2015
Posts: 4
CFasm 09 Apr 2017, 03:43
Trinitek wrote:
You're going to want to write your FASM module as a COFF object, where you will use the 'extrn' directive to prototype the library functions you need. Then, link the produced COFF object file with the library using your toolchain's linker.

See http://flatassembler.net/docs.php?article=manual#2.4.3 and also see the MSCOFF example in the examples folder.




Thanks,i just want to use fasm to compile an exe file but it needs use a lib library,how to achieve
Post 09 Apr 2017, 03:43
View user's profile Send private message Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Trinitek 09 Apr 2017, 04:34
Do not let the fact that FASM can output executable files directly confuse you. FASM does not incorporate a linker, so this is not possible.
Post 09 Apr 2017, 04:34
View user's profile Send private message Reply with quote
CFasm



Joined: 04 Dec 2015
Posts: 4
CFasm 09 Apr 2017, 05:07
yes, i understand

thanks!
Post 09 Apr 2017, 05:07
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.