f



Combining C-Dll into C++-Lib

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>

0
7/23/2007 11:57:18 AM
comp.lang.c++ 49423 articles. 6 followers. Post Follow

2 Replies
222 Views

Similar Articles

[PageSpeed] 6

maybe something like

extern "C"
{
#include ".."
}

is needed?
0
bohnenkamp (14)
7/23/2007 12:03:21 PM
On Jul 23, 2:03 pm, Sascha Bohnenkamp <bohnenk...@mevisbreastcare.de>
wrote:
> 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

0
7/23/2007 1:26:36 PM
Reply: