This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Call functions from Cygwin compiled dll.

Am 24.06.2016 um 09:57 schrieb Azatyan, Anushavan:

I have build in cygwin environment my own dll which calls standard unix like functions
(fopen, fclose, fread â).

I'll interrupt you right there. No, those are not "unix like functions".
Those are Standard C Library functions, i.e. they're required by the
definition of the C programming language itself. Unix-like functions
would be the ones without the leading 'f', i.e. open(), creat(), read(),
write() etc.

Now the Cygwin implementations of these Standard C Library functions
will have some differences in behaviour, as compared to those provided
by Windows native C compilers (MSVC, MinGW*, ...). But those differences
would be much easier to account for than pull in the entire Cygwin subsystem just for this.

And now I would like to attach that dll to my program which is
developed in Visual Studio environment and call some of my function from that dll.
Or I would like to call functions from my dll in Matlab mex or in LabView vi.

For all those jobs you'll need a native Windows DLL. To build one inside
the Cygwin universe you would use the MinGW64 cross-compilation tools.
OTOH, if you already have an use MSVC, it may be better to use it for
this, too.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]