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

Migration to VS2005

I have a command line project that I am migrating from VS2003 to VS2005.
There is a combination of C, C++ and C#. When I build the project, I have
this in my call to cl.exe in my batch file:

/link /nodefaultlib:libc /nodefaultlib:libcmt /nodefaultlib:libcd

My compile gets three unresolved externals:

Searching C:\Program Files\Microsoft Visual Studio 8\VC\LIB\kernel32.lib:
Searching c:\mbs7\sys\lib\expbin\minofuncs.lib:
Searching c:\mbs7\sys\lib\bin\mbs4.lib:
Searching c:\mbs7\sys\lib\bin\WBTRV32.LIB:
Searching C:\Program Files\Microsoft Visual Studio 8\VC\LIB\uuid.lib:
Searching C:\Program Files\Microsoft Visual Studio 8\VC\LIB\OLDNAMES.lib:
Searching C:\Program Files\Microsoft Visual Studio 8\VC\LIB\MSVCRT.lib:
Searching C:\Program Files\Microsoft Visual Studio 8\VC\LIB\MSVCMRT.lib:

Finished searching libraries
Generating clr ijw/native image
Generating non-SAFESEH image.
Importing assembly module c:\mbs7\sys\lib\expbin\csclib.netmodule
racustse.obj : error LNK2001: unresolved external symbol __iob
mbs4.lib(pform.obj) : error LNK2019: unresolved external symbol __pctype
mbs4.lib(pform.obj) : error LNK2019: unresolved external symbol
___mb_cur_max c:\mbs7\cust\demo03\beta\mbs7sys.exe : fatal error LNK1120: 3
unresolved externals

Those three symbols are not contained in the programs listed, and I do not
know where they come from. I assume that I somehow have the wrong combination
of default libraries, but I can not figure it out. Any help would be
appreciated. Thanks.

Jan 2 '06 #1
4 8084
Hi Richard,
racustse.obj : error LNK2001: unresolved external symbol __iob
mbs4.lib(pform.obj) : error LNK2019: unresolved external symbol
__pctype
mbs4.lib(pform.obj) : error LNK2019: unresolved external symbol
___mb_cur_max c:\mbs7\cust\demo03\beta\mbs7sys.exe :
fatal error LNK1120: 3 unresolved externals
Those symbols are referenced in the LIBCD.lib/LIBC.lib, I suggest you
remove the /nodefaultlib option in your cl command.

Those three symbols are not contained in the programs listed,
and I do not know where they come from. I assume that I
somehow have the wrong combination of default libraries,
but I can not figure it out.


You can check your VS2005's VC directory setting(Include files and Library
files), there may be some other includes\libs specified prior to the
default VC includes\libs, if so, you need to sort them back.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 3 '06 #2
Thanks for the reply Gary, I was eventually able to solve the problem. For
future reference, in case anyone is searching, the problem was this:

I was attempting to link in a library that was build with VS2003, and
apparently the obj files contain information about what library to use, and
so they brought in libc.lib, etc. When I rebuilt the library with .NET 2.0,
those libraries were no longer brought in, and the unresolved externals went
away.

Jan 6 '06 #3
That's great, Richard!

I am delight to know you have already fixed this issue, and thanks for
sharing this valuable experience to our community members:)
Good Luck!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Jan 6 '06 #4
I am having the same problem as the OP, but in my case, no combination of
/NODEFAULTLIB and linking with explicit vs2005 libs is solving my problem.

I have a thirdpart library (PowerVR pvr toolkit library) that was apparently
compiled with some older version of the MS compiler. It has a DEFAULTLIB
comment for libc. However, the module I'm linking this in to requires
MSVCRT.lib (the MT DLL version of the CRT), and even though dumpbin -all
msvcrt.lib shows __iob is a symbol in that library, and the linker says it is
finding other symbols necessary in msvcrt.lib, it is sill complaining that
__iob is undefined.

I've been through this process with many other modules moving from vs2003 to
vs2005 and have always figured it out in the past and gotten everything to
compile and link. This is the first one I'm truly stuck on.

Any thoughts? It really should be enough to simply indicate
/NODEFAULTLIB:libc.lib and then make sure to link against msvcrt.lib, (or
msvcrtd.lib), so I'm quite confused.

Thanks.

-Eric Twietmeyer

""Gary Chang[MSFT]"" wrote:
That's great, Richard!

I am delight to know you have already fixed this issue, and thanks for
sharing this valuable experience to our community members:)
Good Luck!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 22 '06 #5

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

Similar topics

8
by: clintonG | last post by:
Membership is broken and who knows what else. Does anybody have any referrals to current documents that explain what was changed and how one might respond? <%= Clinton Gallagher...
2
by: n33470 | last post by:
Hi all, We have an existing website, built with VS2003, that we're in the process of migrating to use in VS2005. After the migration wizard completes, then all of the .aspx web pages are...
6
by: Andre | last post by:
Hi, We had an existing application in ASP.NET 1.1. After migration I tried to utilize MasterPages. The test showed that format for most of labels is treated differently e.g. TextBox'es are much...
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...
2
by: PointMan | last post by:
i make a project in vs2005 that use ASPNETDB.MDF and use <asp:LoginView ID="LoginView1" runat="server" > server control for vs2005 in this case , i'd like to use hosting service but this...
3
by: lewisksh | last post by:
hi, i have 1 MFC project which is written using VC++2003 but i need to migrate to VC++2005. The program (VC++2003) is working fine. but there is erros occur when running in VC++2005, and i just...
0
by: SenthilVel | last post by:
Hi All I have problems when i convert my 1.1 ASPX web application to 2.0 using VS2005. My web application gets compiled fine in CLR1.1 and there is no problem with that. When i do the...
0
by: Renilkumar | last post by:
Hello, I have migrated a VS2003 appl. to VS2005 appl. After migration it automatically created a bin directory under the root and placed all the DLLs there. However I am getting an error message...
1
by: (js) | last post by:
sorry for ma bad english sorry for maybe a little boring question but I want to ask if it is possible writing a .net3.0 programs in vs2005. The company I am working in want to migrate project...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...
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: 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...

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.