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

Problem exporting class with stl member

Tom
Hi everyone!

I get a warning (C4251) if I exports a class which has an stl data-type as
member (in my case a std::map<std::string, std::map<std::string,
std::string> >).

I know what the problem is (std::map must have an export declaration) but I
hope anybody can give me a piece of advice how I can resolve this problem.

Thanks in advance
Tom
Compiler Warning (level 1) C4251:
'identifier' : class 'type' needs to have dll-interface to be used by
clients of class 'type2'
Jul 22 '05 #1
1 1707
"Tom" <no****@yahoo.com> wrote...
I get a warning (C4251) if I exports a class which has an stl data-type as
member (in my case a std::map<std::string, std::map<std::string,
std::string> >).

I know what the problem is (std::map must have an export declaration) but I hope anybody can give me a piece of advice how I can resolve this problem.

Thanks in advance
Tom
Compiler Warning (level 1) C4251:
'identifier' : class 'type' needs to have dll-interface to be used by
clients of class 'type2'


I think it's cured by an explicit specialisation of the template
that you need. However, it's been awhile since I did that. You
should ask in a newsgroup where "dll-interface" is something that
the people recognise (Standard C++ knows nothing about DLLs). I
recommend "microsoft.public.vc.language".

Victor
Jul 22 '05 #2

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

Similar topics

3
by: chetan | last post by:
Hi , myself Chetan Is There anybody could help me ? I am working on the project in c++ ,, I am in great confusion that should I export c++ member functions OR methods to create objects of...
7
by: Lionel B | last post by:
Greetings. The following code compiles ok and does what I'd expect it to do: ---------- START CODE ---------- // test.cpp
4
by: MrTang001 | last post by:
How I can fix this problem? I don't know why it alway prompted (first use this function). I have use newDollars, newCents... to access the base class member variable. And the member functions for...
7
by: Gustavo L. Fabro | last post by:
Greetings! Some classes that once compiled without problems on VS 2003 have now problems on VS 2005 Beta 1. I'm talking about a __nogc class that is exported with __declspec(dllexport). The...
4
by: deejayquai | last post by:
Hi First of all my level = basic! My question= I have a report containing student performance data with a sub-report showing the subjects they have taken that year. I run the report group by...
12
by: 2b|!2b==? | last post by:
I want to export my C++ classes in a DLL, using ordinal # - rather than by name. Will anyone care to enumerate through the steps required to do this? I am already failiar with exporting classes...
15
by: Grey Alien | last post by:
I have a class that contains a std::map variable. I need to export the class via a DLL. the class looks something like this: class MyClass { public: MyClass(); MyClass(const MyClass&); ...
7
by: =?Utf-8?B?Z2s=?= | last post by:
I wonder how to export a call in vba from unmanaged vc++ Usually i can export function ...with stdcall In vb.net I can do that with com class. I would like to instantiate an object from vba. ie...
8
by: puzzlecracker | last post by:
is there a way to create a library (assembly/dll) where I can only export few class? I don't want client to use or know about other internal classes in the assembly. Thanks
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.