Hi,
I'm facing a problem while linking my native dll library into the g++
compiler.
There is a name mangling problem when calling a msvc function from g++
compiler therefore linker gives an error undefined reference.
Is there any method to directly link and call a function from native dll
library from the cygwin compiler ?
For example, I've a fooCls.h header file for a windows library, I add link
the fooCls.dll to g++ compiler then,
fooNameSpace::fooConnectionCls instance;
instance.FooTest();
gives a linker error , undefined reference.
Thank you in advance,
Mumin AYDIN
#ifndef FOOCLS_H
#define FOOCLS_H
#if defined(_WIN32)
#ifdef DLL_EXPORT
#define _WIN_DLL __declspec(dllexport)
#else
#define _WIN_DLL __declspec(dllimport)
#endif
#else
#define _WIN_DLL
#endif
namespace fooNameSpace
{
class _WIN_DLL fooConnectionCls
{
public:
void FooTest();
};
}
#endif // FOOCLS_H
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple