[flext] LIBCPMT.LIB LIBCMT.LIB clash (was Re: linker error when linking a library)

Thomas Grill gr at grrrr.org
Wed Dec 7 23:47:23 CET 2011


Hi Stefano,
normally, the use of this macro FLEXT_USE_CMEM should get you rid of
the clashes. Doesn't it?
gr~~~

2011/12/7 Stefano Papetti <Stefano.Papetti at zhdk.ch>:
> Dear Thomas,
>
> since the clashes that I've encountered are due to the new and delete
> operators, I wonder if it's something related to the use of FLEXT_USE_CMEM
> What do you think?
>
> S
>
>
>
> On 30/11/2011 15.10, Stefano Papetti wrote:
>
> On a second thought:
> using the /FORCE flag for the linker, I managed to ignore the warnings (the
> linker just ignores the second definition of new[] and delete[]) and compile
> the external.
>
> However I'm afraid the incompatibility is generated within  flext itself, as
> the waning doesn't report a clash between libcmt.lib and libcpmt.lib, but
> between flext-pd_s.lib and libcmt.lib/libcpmt.lib
> That's strange because obviously I've compiled flext in the same way as my
> external.
>
> S
>
> On 30/11/2011 14.00, Stefano Papetti wrote:
>
> Hi Patrick,
>
> thanks for the help.
> I had already tried that, but only from command line, just by adding the
> line:
> LDFLAGS =$(LDFLAGS)/NODEFAULTLIB:LIBCMT.LIB /NODEFAULTLIB:LIBCPMT.LIB
> to the file package.txt
> However, it seems that flext's build system overrides this flag, as the
> linker outputs the same error as before.
>
> I plan to try your suggestion in VS, but my purpose at the moment is to get
> things working directly from command line.
>
> Best,
> S
>
> On 25/11/2011 12.56, Patrick Gampp wrote:
>
> Hi Stefano,
> in Visual Studio, exists a flag you could set to ignore LIBCMT.LIB.
> Something
> like "ignore specific library".
>
> http://msdn.microsoft.com/en-us/library/3tz4da4a%28v=vs.80%29.aspx
> http://msdn.microsoft.com/en-us/library/aa278403%28v=vs.60%29.aspx
>
> Patrick
>
>
>
>
>
>
> Am Freitag, 25. November 2011, 12:13:41 schrieb Stefano Papetti:
>
> Dear Thomas,
>
> after giving up for a while, I'm now trying again to figure out how to
> solve the LIBCPMT.LIB LIBCMT.LIB clash reported in the file attached.
> The same thing happens compiling in debug mode (with respect to the
> debug libraries, of course). On the other hand, the shared version of my
> external compiles successfully.
> I went through all the code but unfortunately I can't really see where
> this clash is taking place.
> Of course if I comment:
> LIBS=$(LIBS) LIBCPMT.LIB LIBCMT.LIB
> in \flext\buildsys\win\nmake-msvc-flext.inc everything works... :-P
>
> Do you have any hints?
>
> Ciao,
> S
>
> On 06/08/2011 13.04, Thomas Grill wrote:
>
> Am 06.08.2011 um 11:49 schrieb Stefano Papetti:
>
> Hi Thomas,
>
> On 06/08/2011 11.35, Thomas Grill wrote:
>
> There are essentially two problems, maybe unrelated to each other
>
> - a clash of the delete operator - this is usually caused by using
> different build models for parts that are linked. In your case it
> seems that the libraries LIBCPMT.LIB and LIBCMT.LIB don't fit to each
> other.
>
> ok, I'll try to figure out how to avoid this. Perhaps I just need to
> avoid using delete and new ;)
>
> that would not be a clean solution - there might be other not so obvious
> clashes…. gr~~~
>
> .
>
>
>
>
> _______________________________________________
> http://grrrr.org/ext/flext
>
> flext mailing list
> flext at grrrr.org
> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>
>
>
>
> _______________________________________________
> http://grrrr.org/ext/flext
>
> flext mailing list
> flext at grrrr.org
> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>
>
>
> _______________________________________________
> http://grrrr.org/ext/flext
>
> flext mailing list
> flext at grrrr.org
> http://grrrr.org/cgi-bin/mailman/listinfo/flext



-- 
Thomas Grill
http://grrrr.org


More information about the flext mailing list