473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Mixed Mode DLL Issue (Need Help now!!)

Hello everyone,

I have tried all the solutions trying to figure out how to remedy my mixed mode DLL solution,
however, I still can't get the project to compile. I have tried all the solutions managed in the
Microsoft Knowledgebase article, but I get the following issues:

libcmt.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrt.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrt.lib(cinitexe.obj
libcmt.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in msvcrt.lib(MSVCR71.dll)
libcmt.lib(crt0.obj) : error LNK2005: __amsg_exit already defined in msvcrt.lib(MSVCR71.dll)
libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

D:\Mitel-Development\MiTAI.NET\MitaiNET\Release\MitaiNET.dl l : fatal error LNK1120: 1 unresolved externals

And my original issue involving the last line "unresolved external symbol _main...bla..." is still causing me problems.

Any hints.

Thanks

Paul

Nov 17 '05 #1
2 1742
>I have tried all the solutions trying to figure out how to remedy my mixed
mode DLL solution,
however, I still can't get the project to compile. I have tried all the solutions managed in theMicrosoft Knowledgebase article, but I get the following issues:

libcmt.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrt.lib(cinitexe.obj)

I discovered that static linking of the MFC could cause something similar
like this.
I had to recompile with MFC in DLL instead of static.
Nov 17 '05 #2
> >
I discovered that static linking of the MFC could cause something similar
like this.
I had to recompile with MFC in DLL instead of static.


If you put your unmanaged C++ code in a pure unmanaged DLL (separate
project), a static link with MFC appears to be holding up just fine on
this side.

This approach uses the managed-to-unmanaged C++ class mappings within
a project just focused on that: a proxy layer DLL. The proxy
managed-to-unmanaged DLL does not link with MFC.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Kamzyuk | last post by:
Hello all. Basically, I need to call a mixed-mode dll's function (which uses managed code) from a native or mixed-mode dll function (which does not use managed code). I'm wondering if this could...
2
by: Craig Klementowski | last post by:
Pardon the cross post, but I'm not sure where exactly to post this question. We have MFC application using many MFC extention DLL's. We started using a new MFC extention DLL that is mixed mode so...
0
by: Daylor | last post by:
hi. im buliding a c++ managed assebmly dll , that wraps a native c dll. the compiling i got the "/NoEntry" Warning. i read alot about this bug,and solutions . well i did this for now : a.....
9
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
7
by: Staale L. Hansen | last post by:
We have an application which uses some mixed-mode code to expose a .NET 1.1 managed API. Only the necessary files are compiled with /clr. We want to be able to load the application without .NET...
4
by: tripwater | last post by:
Hello, I am currently trying to learn VS, using C#. I have a book called Beginning C# Databases. I am using sqlserver and the first half of the book deals with windows apps. So it uses the windows...
4
by: Lonewolf | last post by:
hi, I'm still in the process of transiting from MFC/VC6 to vs2005, and a lot of things are very alien to me. So hope you could bear with me if my question sounds stupid. Basically I have native...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.