Hi,
Can any one please resolve this compilation error it is very urgent.
..\DBAccess\Loc alization.cpp(3 81) : error C2593: 'operator + ' is ambiguous
Error executing cl.exe
DK_SSE_VCT.dll - 1 error(s), 0 warning(s)
Actually This was running fine earlier.
Now the VC++ 6.0 Environment has been
reset, As VC++ installed in new system & while trying to build I am getting this error. In the old system VC++ has been uninstalled.
Can any one please tell me to make any settings in the environment, without
making code change to resolve this error
Code: ( text )
1.
_variant_t fieldValue = pRs->Fields->GetItem(_varia nt_t(fieldCnt))->Value;
2.
if (fieldValue.vt & VT_BSTR){
3.
wstring fieldValueWithQ uotes = L"'" + (_bstr_t)fieldV alue + L"'"; // This is Line 381
7 2516
This compiles and links using Visual Studio.NET 2005: -
int _tmain(int argc, _TCHAR* argv[])
-
{
-
_variant_t fieldValue;
-
wstring str;
-
str = L"'" + (_bstr_t)fieldValue + L"'";
-
return 0;
-
}
-
Have you added comsupp.lib to your project as an additional linker dependency?
This compiles and links using Visual Studio.NET 2005: -
int _tmain(int argc, _TCHAR* argv[])
-
{
-
_variant_t fieldValue;
-
wstring str;
-
str = L"'" + (_bstr_t)fieldValue + L"'";
-
return 0;
-
}
-
Have you added comsupp.lib to your project as an additional linker dependency?
Thanks a lot for the reply.
How to add comsupp.lib to the project as an additional linker dependency?
I actually tried like this.
In the Active project, I went to project->settings then in the link tab with the General catagory; I added comsupp.lib in the "Project Options" section but
I am still getting this error. I am not sure whether these are the steps to add
linker dependency. Can you please tell me how can I achieve this ?
Thanks & Regards,
Girish.
You have to:
1) #include <comsupp.h>
2) Add comsupp.lib as an additional linker dependency:
Project Properties->Configuratio n Properties->linker->input->addtional dependencies
3) you may have to specify a path to comsupp.lib by tool->options->Projects and Solutions->VC++ Directories->library files from the drop-down menu in the right pane.
However, I believe comsupp.lib is a standard .lib and probably all you need do is get it correctly specified as an additional linker input dependency.
You have to:
1) #include <comsupp.h>
2) Add comsupp.lib as an additional linker dependency:
Project Properties->Configuratio n Properties->linker->input->addtional dependencies
3) you may have to specify a path to comsupp.lib by tool->options->Projects and Solutions->VC++ Directories->library files from the drop-down menu in the right pane.
However, I believe comsupp.lib is a standard .lib and probably all you need do is get it correctly specified as an additional linker input dependency.
Hello,
I added the comsupp.lib to projects->settings->Link(tab)->Catagory [Input]
Under Project Options added comsupp.lib at the end.
Since it is VC++ 6.0; I am nat able to find projects and solutions Under tools->option [for point 3]
As of now I am still getting the same error
Please reply me for the same.
Thanks,
Girish.
I added the comsupp.lib to projects->settings->Link(tab)->Catagory [Input]
Under Project Options added comsupp.lib at the end.
OK. But did you also set a path to this library??
OK. But did you also set a path to this library??
Hello,
I had gone to tools->options [in the Directories tab] ShowDirectories for
selected < Library files>
and included the path of comsupp.lib the directories listing.
Is this the one you are asking.
I am not finding any difference in the error message.
Thanks & Regards,
Girish.
Yes, that's what I meant.
Now I don't know what's happening, especially since the code compiles using Visual Studio.NET 2005.
Other things:
1) your comsupp.lib is older than mine
2) have you installed all the services packs on VC 6.0??
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Nitin Bhardwaj |
last post by:
Thanx in advance for the response...
I wanna enquire ( as it is asked many a times in Interviews that i
face as an Engg PostGraduate ) about the overloading capability of the
C++ Language.
Why can't the = (assignment) operator be overloaded as a friend
function ?
I work in VS 6.0 ( Win2000 ) as when i referred the MSDN documen'n it
said the following :
|
by: August1 |
last post by:
I've written an interface and implementation file along with a client
source file that allows the use of an overloaded subtraction operator.
However, when
using the program, I'm running into a memory problem that I'm not
readily seeing that lies within the overloaded operator - I think
pertaining to the temporary class object that is created and used to
return a value of the operands and the pointer variable of the class.
Could someone...
|
by: masood.iqbal |
last post by:
I have a few questions regarding overloaded typecast
operators and copy constructors that I would like an
answer for. Thanks in advance.
Masood
(1) In some examples that I have seen pertaining to
casting class A to class B, the implementation of the
|
by: ambar.shome |
last post by:
Hi,
As you know there are few operators in C++ which cant be overloaded.
They are:
.., .*, ::, ?: , new , delete , sizeof , typeid , static_casr ,
dynamic_cast , const_cast , reinterpret_cast .
Theremust be some reason for this restriction for each of the
|
by: Tony Johansson |
last post by:
Hello Experts!
I have the user defined class called Boolean that should be handle all kind
of logic expression such
as if (a && b && c) or if (!a && b && c) osv
I have the class definition Boolean and the main program below.
I have overloaded these operator symbols =, ==, !=, !, ||, &&.
Now to my question I have some problem with this Class Boolean that I use as
| |
by: Bangalore |
last post by:
Hi all,
I have a problem in accessing elements using overloaded operator .
Consider,
const int SIZE=10;
int FALSE=0;
class Array
{
private:
int x;
public:
|
by: raylopez99 |
last post by:
I need an example of a managed overloaded assignment operator for a
reference class, so I can equate two classes A1 and A2, say called
ARefClass, in this manner: A1=A2;. For some strange reason my C++.NET
2.0 textbook does not have one. I tried to build one using the format
as taught in my regular C++ book, but I keep getting compiler errors.
Some errors claim (contrary to my book) that you cannot use a static
function, that you must...
|
by: Frank |
last post by:
Hello everyone,
I am having trouble overloading the < operator for an assignment. I
use a struct that contains information and I would like to sort this
structure using STL sort with my own criteria of sorting. Basically, I
would like to sort on visitor count of the Attraction structure.
However, it never uses the < overloaded operator with my code.
Handler.h:
|
by: EM.Bateman |
last post by:
Working on Visual Studio .Net I've implemented a class:
#ifndef CONTRIBUTOR_H
#define CONTRIBUTOR_H
enum Gender {male=1, female, unk};
#include <iostream>
#include <iomanip>
#include <string>
|
by: subramanian100in |
last post by:
overloaded operator=()
--------------------------------
overloaded assignment operator should be a non-static MEMBER function
of a class. This ensures that the first operand is an lvalue.
If the overloaded assignment operator function is allowed to be a non-
member function then we may be able to write the following:
Suppose we have a class Test for which operator+() is defined,
suppose we have
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |