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

MC++ DLL (VS.2003) compiler errors...(sigh!)

First off, I would like to state that I'm using VS.2003 / .NET Framework 1.1
and the MC++ that comes with it. I am stuck with this IDE for the time
being as I am supporting some older platforms. So, I'm not going to be
migrating to VS.2005 just yet!

I have been working on trying to create a DLL written in MC++. It has
been a while since I've touched C++ and this is my using MC++. However, I
thkink I've been making reasonable progress with this DLL but there just
seems to be the ever mounting pile of compilation errors.

The latest batch are a bunch of C2011: 'class' type redefinition
errors. I think this is simply due to my ignorance of MC++ and what to
include in the header and cpp files. I've managed to figure out that
Interfaces go into header file but that's all I think I have right. Without
going into too much detail my basic layout looks something like:

====Header====
// MyFile.h
using namespace System;
using namespace System::IO;
....

namespace MyNameSpace
{
public __gc class A
{
// Methods
public:
A(); //default constructor
void __gc* One();
...

// Fields
protected:
String __gc* file;
String __gc* text;
Int32 line;
...
}

====MyFile.cpp====
// This is the main DLL file.
#using <mscorlib.dll>

#include "stdafx.h"
#include "MyFile.h"

namespace MyNameSpace
{
public __gc class A
{
// Methods
public:
A() //default constructor
{
}

void __gc* One()
{
//define method here
}
...

// Fields
protected:
String __gc* file;
String __gc* text;
Int32 line;
...
}

Obviously, those aren't the real namespace, class and method names but
it should be enough to give you an idea. If someone could point out what
I'm doing wrong or, at the very least, point me towards a good MC++ tutorial
site it would be much appreciated.

TIA...
Nov 21 '07 #1
1 991
use #pragma once to prevent duplicate declarations when your header file is
included multiple times in a source file.
--
Sheng Jiang
Microsoft MVP in VC++
"A. Nonymous" <an*******@msn.comwrote in message
news:zK******************************@giganews.com ...
First off, I would like to state that I'm using VS.2003 / .NET Framework
1.1
and the MC++ that comes with it. I am stuck with this IDE for the time
being as I am supporting some older platforms. So, I'm not going to be
migrating to VS.2005 just yet!

I have been working on trying to create a DLL written in MC++. It has
been a while since I've touched C++ and this is my using MC++. However, I
thkink I've been making reasonable progress with this DLL but there just
seems to be the ever mounting pile of compilation errors.

The latest batch are a bunch of C2011: 'class' type redefinition
errors. I think this is simply due to my ignorance of MC++ and what to
include in the header and cpp files. I've managed to figure out that
Interfaces go into header file but that's all I think I have right.
Without
going into too much detail my basic layout looks something like:

====Header====
// MyFile.h
using namespace System;
using namespace System::IO;
...

namespace MyNameSpace
{
public __gc class A
{
// Methods
public:
A(); //default constructor
void __gc* One();
...

// Fields
protected:
String __gc* file;
String __gc* text;
Int32 line;
...
}

====MyFile.cpp====
// This is the main DLL file.
#using <mscorlib.dll>

#include "stdafx.h"
#include "MyFile.h"

namespace MyNameSpace
{
public __gc class A
{
// Methods
public:
A() //default constructor
{
}

void __gc* One()
{
//define method here
}
...

// Fields
protected:
String __gc* file;
String __gc* text;
Int32 line;
...
}

Obviously, those aren't the real namespace, class and method names but
it should be enough to give you an idea. If someone could point out what
I'm doing wrong or, at the very least, point me towards a good MC++
tutorial
site it would be much appreciated.

TIA...


Nov 21 '07 #2

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

Similar topics

8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
1
by: lucho | last post by:
Hi everyone, I have the same problem as described under Q316317 (http://support.microsoft.com/default.aspx?scid=kb;en- us;316317) ie a compiler error saying c:\Program Files\Microsoft Visual...
5
by: Dave | last post by:
I am trying to compile my C++ programs in debug mode in Visual NET 2003 and keep getting the following message fatal error LNK1104: cannot open file 'mfc70d.lib I cannot find this program anywhere...
3
by: | last post by:
is there any performance diffrence between MC++ 2003 ,other .NET languages and MC++ 2005 (cause of an optimization) ???
2
by: Just Me | last post by:
I beleive it is because I have some projects in more than one solution that I develope the following type of errors. Can anyone tell me how to avoid this or what to do when it happens? Thanks...
2
by: Samuel R. Neff | last post by:
Within the past few weeks we've been getting a lot of compiler errors in two classes when no errors actually exist. The error always reports as Name '_stepResizeRelocator' is not declared. ...
6
by: Russ | last post by:
This really is the worst Microsoft product I have ever had the misfortune to work with. After the excellent feattures and stability of VS.NET 2002 and 2003, I was confident enough to start a...
1
by: Marcus Kwok | last post by:
I am not sure if this is related to my previous thread ("NullReferenceException with value struct") so I am starting a new thread. I saw in...
0
by: bijtaj | last post by:
Hi, Is there a log file generated when there are VC# 2003 compiler errors? I see that VC++ 2003 generates a BuildLog.htm and the old VC6.0 used to generate a .plg file. Does VC# 2003 projects...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.