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

C++.NET (VS2003) doesn't like native CString &someName

I have a managed C++ Console Application, and C++ Windows Forms application
where I am trying to use an unmanaged header/lib file combo that exposes a
class for functionality... The trouble I run into seems trivial enough, but a
solution I've yet to find.

I get the following errors when trying to compile may application...

error LNK2001: unresolved external symbol "public: virtual class
ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> >
__thiscall MyClass::MyFunc(long,long,long)"

(?MyFunc@MyClass@@UAE?AV?$CStringT@DV?$StrTraitMFC _DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@JJJ@Z)
-and-
error LNK2001: unresolved external symbol "public: virtual long __thiscall
MyClass::MyFunc2(long,class ATL::CStringT<char,class
StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > &)"
(?MyFunc2@MyClass@@UAEJJAAV?$CStringT@DV?$StrTrait MFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)

I've read every google result for a search on CStringT, as well as read and
tried the solution presented by 309801 PRB: Linking Errors When You Import
CString-Derived Classes (Even though 2003 was supposed to fixed this error).
I've even tried including cstringt.h as well as atlstr.h, and some combos
thereof, still no luck.

Anyway, seems only functions declared with an [in, out] CString generate the
errors. I.E. a function prototype: FunctionName(CString &param). No other
function prototypes generate an error.

Is it possible to use this type of class function call in Managed C++ from a
native C++ dll? If so, how?

~Tony
Nov 17 '05 #1
0 1608

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

Similar topics

23
by: ian justice | last post by:
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've...
2
by: lmeng | last post by:
Hi, I am new to this Forum. Thanks in advance for any kind help. In the following HTML code, when I change the value of one text field then click "Modify" button, if the validation fails a...
5
by: QA | last post by:
<img src=http://xxx.com/yyy.jpg onmouseover="settimeout(\"document.location='http://www.google.com'\"), 2000"> I want to have a 2 seconds delay before it is directed to an URL when the mouse is...
1
by: Steven Caliendo | last post by:
Hi, Can someone give me an example of a query that will update a database with an Image type ? So, if I have a picture file on my web server, and I want to add it to my SQL database in a field...
5
by: Matthew.DelVecchio | last post by:
hello, i am working w/ a partner company's webservice, which they wrote in java. using a provided webservice.wsdl file, i am able to compile it into a proxy class, webservice.dll. i can add...
1
by: JeffP | last post by:
Currently I have a user control which contain a <a href> link tag. I have a requirement to change the name property of the anchor tag to something like this: <a href="somepage.aspx" id"thislink"...
3
by: Alexander van Doormalen | last post by:
I have a windows service which calls extensions. In 1 of those extensions I want to load a config file (extension.dll.config). In that config file I defined some ConfigurationSection's. For...
3
by: Arpan | last post by:
The following code creates a DataSet (with only one column named "EmployeeName") in the Page_Load sub & populates a DataList: <script runat="server"> 'Build the DataSource Function...
5
by: Nightfall | last post by:
Dear friends, consider the following scenario, in Visual Studio 2005 and C# - I create a ASP.NET web service ("server") with a class MyClass and a WebMethod SomeMethod() - I create a client...
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...
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
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...
0
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
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.