I'm writing a managed (.NET) library to compile FASM code into a .NET application. After thinking how I can interact with the compiler within my app, I think I'm going to compile FASM as an .obj file (MS COFF), then I will write a managed wrapper in C"++/CLI and then, the compiler will be able to be used in a program written in C# or even VB.NET.
Unfortunately, I'm encountering some issues when I try to compile FASM in MS COFF format. From the example given in the downloadable archive, MS COFF uses a different way to call Win32 API like:
In the FASM.ASM file for WIN32, the import section is written in .data.
So, even if I change the format of the into format MS COFF, the compile operation fails.
Do you have some advices to compile FASM to an obj file ?
I'm sorry if my first message was confused. To summarize, I want to compile "FASM compiler" to get an ".obj" file, so I can then use it in a library written in C++. I thought using MS COFF format (I think this is the best for that, but I'm not completely sure).
I'm encountering some issues when I try to compile FASM for Win32 with the MS COFF format, because it seems the import section is slightly different between the legacy PE format and the MS COFF format.
Do you have any advice to get an .obj format or something else I can use in my C++ library ?
...at the start of FASM.ASM. Then I removed the '.idata' and '.edata' and '.reloc' sections. It compiled, but I haven't run any tests on it. Of course, it'd also be possible to write a wrapper for the DLL.
Oh, you'd want to specify the export functions as public.
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