473,491 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Linking error in VC++ .NET 2003

My copy of VS .NET is Microsoft Development Environment 2003, Version 7.1.3088
Microsoft .NET Framework 1.1, Version 1.1.4322

I have a project (C++ Class Library) I originally wrote in VS .NET 2002. It worked then, and when I convert it to VS .NET 2003 and recompile, it works now.

The problem is creating new projects in VS .NET 2003.

If you have my version, try this:

Create a blank solution (I called it "Test").
Add a new C++ project (Class Library (.NET)); I called mine "LinkFault".

Here is LinkFault.h:
==========================================
// LinkFault.h

#pragma once

using namespace System;

namespace LinkFault
{
public __gc class Class1
{
static double foo( const double x );
};
}
==========================================
Here is LinkFault.cpp:
==========================================
// This is the main DLL file.
#include "StdAfx.h"

//#using <mscorlib.dll>
//using namespace System;

#include "LinkFault.h"

#include <cfloat>
#include <cmath>

double LinkFault::Class1::foo( const double x )
{
// LinkFault error LNK2001: unresolved external symbol "int __cdecl _finite(double)" (?_finite@@$$J0YAHN@Z)
if ( _finite( x ) ) {
// do something
}
// LinkFault error LNK2001: unresolved external symbol "int __cdecl _fpclass(double)" (?_fpclass@@$$J0YAHN@Z)
else if ( _fpclass( x ) == _FPCLASS_PINF ) {
// do something else
}
else if ( _fpclass( x ) == _FPCLASS_NINF ) {
// do something else
}

// LinkFault error LNK2001: unresolved external symbol "double __cdecl sqrt(double)" (?sqrt@@$$J0YANN@Z)
return sqrt( x );
}
==========================================
I have added comments indicating the kind of errors I get.

When I change from Debug mode to Release mode the "sqrt" link error disappears, but the others persist.

I am at my wits' end!
Nov 17 '05 #1
1 1392
Add "\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\msvcrt.lib" to the Property Pages--> Linker-->Command Line additional options

Why isn't that the default?
Nov 17 '05 #2

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

Similar topics

1
4355
by: yanwan | last post by:
Hello I met some problems in linking a project, and hope someone can give me some advice. -----------Configuration: lighting - Win32 Release-------------------- Linking... LINK : warning...
4
3004
by: Gary Hughes | last post by:
Hi all, sometime I posted a problem in here where I was getting the following error from the linker in VS C++ 2003. Linking... GCClass.obj : error LNK2022: metadata operation failed (80131188)...
2
7221
by: | last post by:
Help! I'm new to c++, and am breaking my teeth on MS Visual C++ (bundled within Visual Studio .NET 2003). Am trying to link simple c++ code to fortran dlls created in Compaq Visual Fortran (v6.1)....
7
6529
by: wmkew | last post by:
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with...
0
1650
by: Rudy Ray Moore | last post by:
I've been having trouble getting incremental linking to work under Visual C++ .net 2003 7.1 for my multi-project workspace. Ronald Laeremans and Carl Daniel (and a few others) helped me figure it...
0
1449
by: zhangrusi | last post by:
I have a static library that is compiled using the latest version of VC 6. It uses the multithreaded DLL versions of the run-time library, and it uses STL classes. I would like to make use of this...
6
3436
by: Uli | last post by:
Hello, I'm trying to use a DLL (by static linking) which was compiled with Borland C++Builder (BCB) in Visual C++ (Visual-Studio 2003). All functions are declared with the directive 'extern...
4
6385
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the...
0
1425
by: JohnIdol | last post by:
VC++6 to VC++2003 - linking troubles -------------------------------------------------------------------------------- Hi All, I successfully ported an application from VC++6 to VS2003. Solved...
1
1768
by: tomb | last post by:
I haven't worked with Visual C++ before, so I'm in a little over my head on a project I'm doing. I'm using VC++ 2003 unmanaged code, and I am getting this linking error that I don't understand:...
0
7112
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
7183
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...
1
6852
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7356
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...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.