Combining C-Dll into C++-Lib

J

jimbo

Dear all,

I have a Dll compiled with cygwin -mno-cygwin in order to avoid the
cygwin dependency. Now I switched to msvc++ to use this dll in my
project. I therefore generated myself an import lib called test.lib
that is attached to the c-dll.

In my C++ Project with msvc++ I would now like to use this dll to link
agains a static c++ library compiled with msvc++.

I have already done this and it did work (no unresolved symbols :))

Now I wanted to use this static library (that still has the dependency
to the c-dll) to link a c++ programm against it.

Now I get several linker errors. On example is below:

FLENS.lib(blas.obj) : error LNK2019: unresolved external symbol
_cblas_dtrmm ref
erenced in function "void __cdecl flens::trmm(enum
flens::StorageOrder,enum flen
s::BlasSide,enum flens::StorageUpLo,enum flens::Transpose,enum
flens::UnitDiag,i
nt,int,double,double const *,int,double *,int)" (?
trmm@flens@@YAXW4StorageOrder@
1@W4BlasSide@1@W4StorageUpLo@1@W4Transpose@1@W4UnitDiag@1@HHNPBNHPANH@Z)
s01_t07_vectorviews.exe : fatal error LNK1120: 18 unresolved externals

Can anybody explain me what I am doing wrong?? I know that C++ uses
name mangling, but I used the msvc compiler already for the merging of
the c-dll and the c++ static lib and now just wanted to continue....

Thank you very much in advance for your help.

Joachim

C:\FLENS\tutorials>
 
J

jimbo

maybe something like

extern "C"
{
#include ".."

}

is needed?

I already tried to do this but then I other errors.

I will try a few other things and let you know if it works...

Take care.

Joachim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top