473,799 Members | 2,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cannot find class definition

hi,
in my vc++.net project using vs.net2003, i have 1 project where i
defined an __gc __interface called Iface compiled to a Iface.dll and
in another project which reference Iface.dll, there is a MyClass that
derives from the Iface.
however, i am getting this error C2504: 'Iface' : base class
undefined'

i understand the error, but cannot understand why the compiler cannot
find Iface.dll. Codes snapshot:

// MyClass.h
#using <mscorlib.dll >
// set the #using reference property in the project where Iface.dll is
#using <Iface.dll>

public __gc class MyClass : public Iface
{
......
};

i have included the Iface.dll with the #using directive, which i
thought should allow the compiler to find Iface.dll. Also set the
Reference node in solution explorer to also reference Iface.dll.
still, i get the above compilation error.

however, if i add #include "../project1/Iface.h" instead, the Iface is
found and no compilation error.
so i am a little puzzle with this. i thought #using <Iface.dll> should
do the trick and import the definition of Iface into MyClass, but
apparently it did not work. (for unmanaged C++, i do understand the
need, the inclusion of the header )

hope someone understands this, knows the problem and let me know. I
got many more of such code design and i need to fundamentally
understand why it does not work for managed c++.
thanks
meng
Nov 16 '05 #1
0 1307

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

Similar topics

8
21727
by: Dev | last post by:
Hello, Why an Abstract Base Class cannot be instantiated ? Does anybody know of the object construction internals ? What is the missing information that prevents the construction ? TIA. Dev
10
4475
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat Enterplise Linux 3 ES, and applied FixPack fp5_mi00069.tar to it. After creating an instance, starting the database, creating a database, and entering the table definitions, all of which seems to work OK, I entered a tiny 8-row table and can do...
1
2041
by: Slavisa | last post by:
When I make my program on RedHat 9.0 everything goes fine, but when I try to make on Red Hat 7.2 I get following errors: logic2_msgcln.c:178: warning: initialization makes integer from pointer without a cast logic2_msgcln.c:178: initializer element is not constant logic2_msgcln.c:178: warning: data definition has no type or storage class logic2_msgcln.c:185: parse error before `void' logic2_msgcln.c:225: parse error before `('
7
9296
by: John Grandy | last post by:
make a call to XML Web Service WebMethod ... returns object myArray with no error ... myArray contains objects of type StringKeyStringValue runtime error occurs on accessing properties of myArray <<< ex.Message "Server was unable to process request. --> There was an error generating the XML document. --> UtilityStorageLibrary.StringKeyStringValue
4
6306
by: newbie120 | last post by:
Hi all maybe its just been a long day, but i have a question about call access modifiers in C#. Consider the following code. namespace Application { private class Class1 { int i;
8
1685
by: blisspikle | last post by:
Can any Public class be inherited from? I installed some software on my pc and I can use it in my code, but I cannot seem to inherit from it. It was an executable that installed on my pc, I do not understand how that works, but I can use it. I put it in the references to use it in my code. If I look at the definition it just says.. Public Class CABEthernet Member of: vHMIABE
6
2587
by: webinfinite | last post by:
Hi, How to find a STL class size, for example: string. I would like to know what the size of the implementation of this class, I am not interested in the size of its object but the class itself. There are discussion regarding addition of all the data member of the class/ structure to find out its size, but is there a neat way to find out class' size? Thank you very much for your attention.
4
1877
by: =?Utf-8?B?VG9yZW4gVmFsb25l?= | last post by:
Was editing code, am getting the following errors } expected Type or namespace definition, or end-of-file expected Eyes crossed cannot find code below! using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing;
8
20436
by: Stefano Sabatini | last post by:
Hi all, I'm encountering this while trying to implement a factory singleton method to generate objects. The singleton has a static map which binds a static creation function defined in each class to the type of the object to be created. Here it is the code, which is a modification of the wikipedia C++ factory example code: ----------------------------------8<--------------------------------
0
9687
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, 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...
0
9541
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10225
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,...
0
9072
agi2029
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...
1
7564
isladogs
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...
0
6805
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();...
1
4139
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
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.