flat assembler
Message board for the users of flat assembler.
Index
> Windows > Problem with MS COFF in C++ DLL file |
Author |
|
bitRAKE 18 Jul 2021, 15:34
Are you trying to produce a DLL or a MS COFF object file? Presently, you are mixing the two together. There are examples in the distribution to produce a DLL, so I will ignore that and assume you are trying to create an object file that exports a function.
Creating an object file, PUBLIC/EXTERN refers to functions that are accessible to other object files. PUBLIC makes the function visible by other object files, EXTERN indicates symbols that are in other object files. Working with object files, it is the linker that creates the DLL. Which functions are exported by the DLL are typically specified in an external (.DEF or .EXP) file. So, you see, there are two concepts getting mixed together. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
18 Jul 2021, 15:34 |
|
bitRAKE 19 Jul 2021, 21:54
kiselevd2002 wrote: But what data export block is nowhere is told. Code would look like: Code: data export ; ( put code here to generate export data ) end data Quote: data directive begins the definition of special PE data, it should be followed by one of the data identifiers (export, import, resource or fixups) or by the number of data entry in PE header. The data should be defined in next lines, ended with end data directive. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
19 Jul 2021, 21:54 |
|
donn 26 Jul 2021, 00:31
ms coff example is here:
https://flatassembler.net/examples.php Mixing assembly with MS Visual C It's what I used to get started with MS COFF, and MS COFF is my primary format now. You can use it as a lib, or execute with it after linking, i.e.: Code: link /LARGEADDRESSAWARE /MACHINE:X64 /SUBSYSTEM:WINDOWS /ENTRY:start asmObjFile.obj "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\um\x64\User32.Lib" "C:\VulkanSDK\1.1.130.0\Lib\vulkan-1.lib" /LIBPATH:"C:\VulkanSDK\1.1.130.0\Lib" (incomplete included libraries, but shows the gist of a Win Vulkan app) |
|||
26 Jul 2021, 00:31 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.