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

Bug report: static string in dllimport-ed class causes internal co

[ Microsoft Visual C++ .NET 69586-335-0000007-18332 ]

Hi,

I'm not sure this is the right place to report bugs in MS Visual C++ .NET
2003. I posted the same message on MSDN forums
(http://forums.microsoft.com/msdn/Sho...?PostID=95745).

In any case, the code below causes the following error:

main.cpp(22): fatal error C1001: INTERNAL COMPILER ERROR (compiler file
'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symta b.c', line 4533)

My code:

// Bug report: static string variable in dllimport-ed class causes
// internal compiler error in p2symtab, line 4553

#include <iostream>
#include <string>

using namespace std;

class __declspec(dllimport) input_port {

public:
int foo() {
static string str = "ABCD" ;
return 2;
}
};

int main()
{
cout << __FILE__ << endl;

string r ("ABCD");
return 0;
}

The two strings (str in foo, and 'r' in main) need to be the same for the
bug to occur.

Nov 17 '05 #1
1 1207
>I'm not sure this is the right place to report bugs in MS Visual C++ .NET
2003. I posted the same message on MSDN forums
(http://forums.microsoft.com/msdn/Sho...?PostID=95745).

In any case, the code below causes the following error:

main.cpp(22): fatal error C1001: INTERNAL COMPILER ERROR (compiler file
'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symt ab.c', line 4533)


FWIW, your example compiles cleanly with the VS2005 beta. I could
reproduce the problem with VS2003.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2

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

Similar topics

4
by: deko | last post by:
I can't move a multi-page report to the last record unless I keep the popup form (that defined it's subreports) open. DoCmd.OpenReport "rptStandard", acViewNormal DoCmd.Close acForm,...
3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
4
by: newest newbie | last post by:
I'm new to using c#, but what I'm trying to do is create a library control containing a form which in turn contains a Windows application that I have defined in another library. I'm able to do...
9
by: Gnic | last post by:
Hi, I have a (Complied) C Library that needs to be called using c# code, some of the function require char* parameter(in and out) Here is the problem, There is a function that expect an...
4
by: ss | last post by:
hi! i am trying to use private static extern int PlaySound(String pszSound, int falgs); but it doesn't play the sound although it exists (even by checking file.exist) any solutions? 10x
10
by: Thirsty Traveler | last post by:
The following code will instantiate a specific Crystal report (TestRpt.rpt): public static void CreatePDF() { DataSet ds = TestDAL.GetCrystalDS(); TestRpt rpt = new TestRpt();...
0
by: Mariana | last post by:
Hello, I am exporting reports in pdf format from .net 2005 . The export is working fine; however the user values of stored procedure parameters does not show in the report. What do I need to do in...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
2
by: =?Utf-8?B?QWxleCBNdW5r?= | last post by:
I am using Visual Studio 2005 Professional edition and built in CR version 10.2.3600.0 to create a web application. The front-end to the report is written in C#. Basically Report.aspx creates...
5
by: adeel shahid | last post by:
I m using .NET Crystal Report but i have to create report using different servers. right now the connection string is static using store procedure but i want to change the connection string at...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
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,...
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...

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.