flat assembler
Message board for the users of flat assembler.

Index > Main > OpenCV and other libraries for FASM

Author
Thread Post new topic Reply to topic
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 24 Mar 2018, 19:10
Hello,

in the FASM folder is provided the OpenGL library. But is it possible to use OpenCV, and other C libraries. Via dll I imagine? Where can we find them?

_________________
The best way to predict the future is to invent it.
Post 24 Mar 2018, 19:10
View user's profile Send private message Reply with quote
yeohhs



Joined: 19 Jan 2004
Posts: 195
Location: N 5.43564° E 100.3091°
yeohhs 25 Mar 2018, 07:43
Yes. Very Happy You can download the source codes or pre-compiled DLLs (if there are any) from their websites.
Post 25 Mar 2018, 07:43
View user's profile Send private message Visit poster's website Reply with quote
Mino



Joined: 14 Jan 2018
Posts: 163
Mino 25 Mar 2018, 08:40
Really, just this? I thought there were versions specially designed for the FASM assembler.
Thanks in this one Smile
Post 25 Mar 2018, 08:40
View user's profile Send private message Reply with quote
yeohhs



Joined: 19 Jan 2004
Posts: 195
Location: N 5.43564° E 100.3091°
yeohhs 25 Mar 2018, 09:22
You'll need the C header files to find out the public interface, i.e. the C function prototypes and data structures. The tricky part to watch out for are the C macros.

But they are all in C. So you'll need to translate them into asm includes. There are tools for this but not 100% accurate.

It's a lot of work. Smile Fun, if you have the time.
Post 25 Mar 2018, 09:22
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 25 Mar 2018, 09:39
yeohhs wrote:
The tricky part to watch out for are the C macros.
Do the C compilers save the preprocessed output to a file? If they do then the macros would be expanded and removed. That might it it easier to translate to fasm.
Post 25 Mar 2018, 09:39
View user's profile Send private message Visit poster's website Reply with quote
yeohhs



Joined: 19 Jan 2004
Posts: 195
Location: N 5.43564° E 100.3091°
yeohhs 25 Mar 2018, 10:14
revolution wrote:
Do the C compilers save the preprocessed output to a file? If they do then the macros would be expanded and removed. That might it it easier to translate to fasm.


Yes, there's a compiler option to do that but the output will be huge and probably unreadable. I suppose with a C-to-Inc tool, it might be manageable.

I usually study the example C source codes that come with the C library to figure out how it works. Then I would write many small C codes that call the library functions. After that, stepping through the programs in a debugger or disassembling the programs should reveal all I need to know. Smile
Post 25 Mar 2018, 10:14
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2568
Furs 26 Mar 2018, 12:18
revolution wrote:
Do the C compilers save the preprocessed output to a file? If they do then the macros would be expanded and removed. That might it it easier to translate to fasm.
GCC/TCC have the -E option to preprocess a file, dunno about other compilers.

But yeah the output will be huge due to headers, it's not hard to filter it with sed or whatever though, to only show you lines from the start of your file onwards etc.
Post 26 Mar 2018, 12:18
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.