473,804 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

1 solution 2 projects; how to use a function from project B into project A

hello,

i've got a question about using a function from project B in project A.
The projects are both in the same solution (using Microsolft Visual
Studio 2005)
the projects ara both native C++.

i've already added a reffrence from projectB into projectA.

i've got a function in projectA:
mainClass.cpp:
int main ()
{
int i = 0;
// i want to use function from project B like this:
// i = functionFromPro jectB (10);
return i;
}
and in project B:
fileX.cpp:
int functionFromPro jectB (int i)
{
return i * 4;
}

i know, the example is a little stange but it may be usefull to explain
my problem.

Dec 18 '06 #1
2 1338
Geo

unknown; wrote:
hello,

i've got a question about using a function from project B in project A.
The projects are both in the same solution (using Microsolft Visual
Studio 2005)
the projects ara both native C++.

i've already added a reffrence from projectB into projectA.

i've got a function in projectA:
mainClass.cpp:
int main ()
{
int i = 0;
// i want to use function from project B like this:
// i = functionFromPro jectB (10);
return i;
}
and in project B:
fileX.cpp:
int functionFromPro jectB (int i)
{
return i * 4;
}

i know, the example is a little stange but it may be usefull to explain
my problem.
Maybe it's me, but I can't actually see a question !

Anyway, if there is one in there it is certainly OFF TOPIC, you need to
find a "Microsolft Visual Studio 2005" (sic) related newsgroup

Dec 18 '06 #2
you're right.
i've just posted this message in an other topic.
thanks anyway
Geo schreef:
unknown; wrote:
hello,

i've got a question about using a function from project B in project A.
The projects are both in the same solution (using Microsolft Visual
Studio 2005)
the projects ara both native C++.

i've already added a reffrence from projectB into projectA.

i've got a function in projectA:
mainClass.cpp:
int main ()
{
int i = 0;
// i want to use function from project B like this:
// i = functionFromPro jectB (10);
return i;
}
and in project B:
fileX.cpp:
int functionFromPro jectB (int i)
{
return i * 4;
}

i know, the example is a little stange but it may be usefull to explain
my problem.

Maybe it's me, but I can't actually see a question !

Anyway, if there is one in there it is certainly OFF TOPIC, you need to
find a "Microsolft Visual Studio 2005" (sic) related newsgroup
Dec 18 '06 #3

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

Similar topics

10
510
by: Simon Jefferies | last post by:
Hello, I'm getting a strange problem where when I load up my solution that has three projects:- a managed C++ .NET, one C++ lib, and a VB library. It locks up and doesn't load completely, I have to do the following to work around it.
5
349
by: Tim Marsden | last post by:
HI, I am developing a application in vb.net. I split down my functionality into several separate DLL's. The solution is becoming very large, nearly 100 projects, each project a dll's. There is one entry exe. It is very slow to load and compile now. All my references are project references, is there a standard way to split the solution. In the past I have had versioning problems if a compile groups of projects individually.
3
6839
by: Danny | last post by:
Hi I trying to master msBuild but have a problem. I have a solution that I wish to build using msbuild but want to override BeforeBuild/AfterBuild targets for each of the projects. I trying to avoid modifying the common.targets etc and the individual project .sln files and just do it within a solution proj. One method I've tried, is to create the .proj file from the .sln file using the msbuildemitsolution enviroment flag- base upon
2
1236
by: unknown; | last post by:
hello, i've got a question about using a function from project B in project A. The projects are both in the same solution (using Microsolft Visual Studio 2005) the projects ara both native C++. i've already added a reffrence from projectB into projectA. i've got a function in projectA:
3
2294
by: Sami Lakka | last post by:
I have a solution with a two projects. The first project contains my classes and an executable using those classes. The second project contains unit tests for the classes. Because the unit test framework that I use requires a main function I have to keep the tests in a separate project. Now when I try to link the unit test project I get a lot of "Error LNK2019: unresolved external symbol" errors. Both projects compile just fine and and the...
4
3577
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as projects from my Website. I also have a common set of DLLs I use across all of my applications. It would be great if I could put all of those DLLs into their own projects, and to reference that project from various solutions. The way my solution is...
3
2161
by: Manikandan | last post by:
Hi, I'm copying projects from a solution in the vss. In my local system i created solution ,added that project(make modification related to solution) When i added this solution to vss, projects are referred to the original solution not from my new solution I will explain more clearly i have project folder in vss(v4.5) v4.5(folder) project1(project)
5
1346
by: Ohad weiss | last post by:
Hi all, I have a class in project A. At the same solution, I have another project - named project B. I want to write a piece of code in that class from project B that finds the class in project A. How can I do that? I have a code to do that, if the class is in the same project (by using Application.ProductName, but even if I chaned it to the second project name,
9
2379
by: GaryDean | last post by:
I know this is a vs issue but nobody seems to answer posts over there... In VS 2008 I can't seem to get a multiple project solution. If I create a blank solution and add a project to it, it becomes just a project with not solution node at the top so I can't "add a project" to the node. If I add a project from the file menu it becomes that new project. I'm using Vista. Anyone have a clue? Thanks, Gary
0
9704
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
9571
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,...
1
10302
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
9132
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
7608
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
6845
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();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4277
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
3803
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.