473,396 Members | 1,894 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,396 software developers and data experts.

Migration

Ken
Hi all,

I got a *.lib files and some header files from a thrid party which is
developed using ANSI C. I am now trying to create a managed C++ application
and import those libraries. I added the lib file in the linker option and
include those header files inside the program. Everything is ok when i
complied the project.

However, when I call one of the function inside the lib file I imported
and compile the project, a lot of multiple defined symbol error is found.
(e.g. ___argc already defined in libcmtd.lib(crt0dat.obj)). I don't know
what's wrong with it as I am new to both C++ and VC++.NET. Can anyone help
??

Kenneth


Nov 17 '05 #1
2 911
Ken schrieb:
I got a *.lib files and some header files from a thrid party which is
developed using ANSI C. I am now trying to create a managed C++ application
and import those libraries. I added the lib file in the linker option and
include those header files inside the program. Everything is ok when i
complied the project.

However, when I call one of the function inside the lib file I imported
and compile the project, a lot of multiple defined symbol error is found.
(e.g. ___argc already defined in libcmtd.lib(crt0dat.obj)). I don't know
what's wrong with it as I am new to both C++ and VC++.NET. Can anyone help


Maybe you included the header files more then once?
"#pragma once" might help you.

B.

--
BM Computer-Services, Bergmannstr. 66, 10961 Berlin
Webdesign, Internet, Layout und Grafik
Tel.: 030/20649400, mobil 0175/7419517, Fax: 030/20649401
Web: http://www.bmservices.de, eMail: ko*****@bmservices.de
Nov 17 '05 #2
Ken wrote:
Hi all,

I got a *.lib files and some header files from a thrid party which
is developed using ANSI C. I am now trying to create a managed C++
application and import those libraries. I added the lib file in the
linker option and include those header files inside the program.
Everything is ok when i complied the project.

However, when I call one of the function inside the lib file I
imported and compile the project, a lot of multiple defined symbol
error is found. (e.g. ___argc already defined in
libcmtd.lib(crt0dat.obj)). I don't know what's wrong with it as I am
new to both C++ and VC++.NET. Can anyone help ??


The problem is that the library and the code you're trying to link it in to
were compiled with different runtime library settings (e.g. the library was
compiled with /MT and you're compiling with /MD). Your choices are two:

1. Re-compile the library with /MD to match your managed code.

2. Add the linker option /NODEFAULTLIB:LIBCMTD.LIB to your linker settings
(you'll likely have to add /NODEFAULTLIB:LIBCMT.LIB to the release build
configuration as well).

-cd
Nov 17 '05 #3

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

Similar topics

9
by: Paddy McCarthy | last post by:
Frustrated at being prevented from using Python at work I went gunning for Perl. Time to roll out some useless Google statistics to make me feel better Google Phrase count...
4
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
11
by: Jep | last post by:
Any help or advice appreciated. We have just installed and configured a new DB2 v.8.1 with latest FixPack. Just a few days later it dies and now we have a DB that is totally unusable. - - - -...
4
by: Abram Friesen | last post by:
Hi, I'm a developer for a software application vendor, and our application makes use of a customer-maintained Oracle 8i/9i database. We've had a customer request to support DB2 database, and I'm...
1
by: sac | last post by:
I am using DB2 v8.1 on UNIX. A few weeks ago the DBAs carried out node migration activity on the database. After the node migration I observed that the queries that execute on temporary tables...
1
by: rob | last post by:
Dear All, I have a very small test project to convert asp to asp.net using the Microsoft/Artisan ASP to ASP.NET Migration Assistant...
1
by: Bonggoy Cruz | last post by:
We have a fairly big size ASP.NET web application that was written VB.NET. We are in the process converting the web project. We used the migration wizard included in VS 2005. I followed step by...
60
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the...
9
by: Troels Arvin | last post by:
At work, some people have found IBM's Migration Toolkit (MTK) to be a nice tool for copying data from one table (in another DBMS product) to DB2. Now, they want to do the same thing from one DB2...
3
Frinavale
by: Frinavale | last post by:
I have been researching the best approach to migrating a VB6 application into a VB.NET application. There is a lot of information out there but most of it recommends that you "train in the migration...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.