1

Okay say I'm compiling a windows binary but I need to call a function from a linux library when running on cygwin. How would one go about doing this? Does it even make sense?

My idea is compiling a dll with one function that links against the linux lib and calls the function. Then just load the dll when needed.

Kinda new to linking stuff so any input is appreciated

Comments
  • 1
    Wouldn't it be easier to compile the linux library under windows?

    Or is the library a part of cygwin?

    And... What library are we talking about?
  • 0
    @IntrusionCM The linux kernel I guess? I need to call tcsetattr from termios.h. I really don't know where that is. But I think I may have found the solution which is just linking against cygwin. I mean vim uses ncurses and it works in msys2 (linux like terminal on windows) simply by compiling it on windows. That sorta tells me that the functions are where they need to be I just need to explicitely link against cygwin
Add Comment