473,320 Members | 1,952 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.

compile code in Visual Studios

I wasn't sure how what subject to put for this, but what I really want to know is how to compile code which is located outside of my Visual Studio project folder.

For example if my project is located in C:\my project\...
But the source files are located X:\source files\....

May I add the point that I cannot move the source files and nor the project files together. They have to remain seperate. How can I tell my Visual Studio 2008 to compile the code located in that folder?

Does anyone know?

Thank you.
Mar 17 '09 #1
21 1999
Plater
7,872 Expert 4TB
You *might* be able to open the project file in a text editor and input pathnames for the files.
You run the risk of corrupting the project file though, so be sure to make a backup copy of it
Mar 17 '09 #2
tlhintoq
3,525 Expert 2GB
Right click
Add existing item
browse
Use the triangle on the 'add' button to select "add link" instead of the normal add that makes a copy.
Mar 17 '09 #3
tlhintoq: I am having trouble finding the triangle you are talkin about. This is in Visual Studio 2008 right?
Mar 17 '09 #4
tlhintoq
3,525 Expert 2GB

Mar 17 '09 #5
mine doesnt have the triangle thing. :(
Mar 17 '09 #6
tlhintoq
3,525 Expert 2GB
Visual Studio 2008 professional?
Done all the updates etc.?
Mar 17 '09 #7
Yes.
Havent done updates.

Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5

Installed Edition: Professional
Mar 17 '09 #8
tlhintoq
3,525 Expert 2GB
Is there anyone else out there you can NOT do "Add as link" as shown in the image above? I can't think of any reason the OP wouldn't have this feature aside from a bad Visual Studio installation.
Mar 18 '09 #9
well,

i ran into another problem. let me explain:

1. My visual studio project is located on my local drive.
2. I added the source code (which is located on a network drive) by right clicking and going to "add exisiting item".
3. yesterday i compiled the code and it compiled with no errors/warnings.
4. Today, I came in and there were changes made to the code and I tried compiling it again, and ended up getting all these errors. The errors did not make sense as to why they were appearing, because the code looked ok. I even created a new project and added the same code and it compiled fine. However, my old project did not want to compile (not sure why this is happening).

So, I found out today that there is a Service Pack 1 for VS2008. I am not sure if this is going to fix the problem or not.

Any suggestions?
Mar 18 '09 #10
tlhintoq
3,525 Expert 2GB
This is why I asked if you had done all the updates.
Mar 18 '09 #11
so do you think the updates might fix the problem?
Mar 18 '09 #12
Plater
7,872 Expert 4TB
I think the issue of sometimes having to start a new project and copy/paste things in, was one of the issues they tried to address in SP1 for vs2008?
Mar 18 '09 #13
tlhintoq
3,525 Expert 2GB
I think updates are created for a reason beyond keeping the coders employed.
I won't hazard a guess about your specific issues.
But you do the updates for your operating system, right?
You issue updates to the software you write when you find bugs, right?
Mar 18 '09 #14
tlhintoq
3,525 Expert 2GB
2. I added the source code (which is located on a network drive) by right clicking and going to "add exisiting item".
Was that as a link? If not, then the files were copied into your project. From this point forward your files are a copy of the originals.

4. Today, I came in and there were changes made to the code
Someone else made changes to the code you are working on?
Did they make changes to the files copied into your project, or on the original files? This is why it is important to have those files as links, not copies.

Maybe the errors are because still other files that you don't have links to were changed. Maybe methods were changed so they don't take the same arguments or don't return the same value types.
Mar 18 '09 #15
Ok, so i did update VS to SP1.

Still no cigar.

I did however discover something. You are running a C# project. I created a C# project and guess what? I can add items "as Links" with that little trianle thing. However, I am under a C++ project (Win32 Console Application), which doesnt have this magical option. =\
Mar 18 '09 #16
tlhintoq
3,525 Expert 2GB
Learn something new every day.
Mar 18 '09 #17
Plater
7,872 Expert 4TB
@sevak316
Very odd. Its so rare we find someone doing a managed c++ project that it never really occures to us to check for those differences (normally its C# vs VB)
Mar 18 '09 #18
i am not sure what you are talking about. please explain.
Mar 18 '09 #19
Plater
7,872 Expert 4TB
@sevak316
I was just saying we generally look for differences between C# and VB.NET, it never occured to me to check to see if you were using C++
Mar 18 '09 #20
i am not comparing source code nor projects. You must have misunderstood the point of this thread which was how to link/compile files located outside of VS2008.

With that said, I have solved the problem. It was in my "Additional #include directory" located under the project properties. The directories were mapped to a different project, so the project was not compiling correctly.
Mar 18 '09 #21
Plater
7,872 Expert 4TB
Nevermind, my response had nothing to do with solving the problem, more explaining why we didn't think to ask what type of project you were doing (c++ win32)
Mar 19 '09 #22

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joe Sullivan | last post by:
I have noticed that Visual Studios .NET has a debug mode for SQL statements, but I can't seem to get it to work with MS SQL Server. I can't seem to pull up my stored procedures from the Server...
5
by: Addam Webber | last post by:
Anyone, I am creating a C++ program that will read in data from a command line. However, during building I would like to test it from a file. Is there any way to do output redirection in Visual...
1
by: Ken Janke | last post by:
I am trying to understand something about using visual studios .net 2003. I am trying to find out about the headers in visual c++ .net 2003. Do they have to be without .h at the end? Or should I...
0
by: AB | last post by:
Hi, I am trying to convert some crystal reports from Paradox to SQL Server in Visual Studios 2005 by setting database location. I am unable to do that for some reports. It displays an error...
0
by: Steve Kershaw | last post by:
Hi All! I'm having a problem debugging a web application. The application initially started with a message that indicated that my userid wasn't in the Debug Group (it was). Now the application...
3
by: Gina_Marano | last post by:
Hey All, I have created an application and an installer for it using Visual Studios "Setup and Deployment" project template. It works great (for the simplicity that I require) except that it...
0
by: ashswin | last post by:
I'm trying to create a program using Visual Studios C# to create an excel file and plot the data on a chart. I already know how to make the excel chart and insert data into cells, but can someone...
10
by: yansong1990 | last post by:
well ok, im pretty new to c++, i have -a lot- of exp in programming in VBA (visual basic for app) for excel to make macros so i picked up a new course for computing which handles c++ only, i...
1
by: =?Utf-8?B?RnJpZWRp?= | last post by:
Hi everybody, I am studying VB 2005 express and think, very interesting projects can be developed with it. Before I step over and buy the VB full version, can anybody tell me the difference of...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: 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...
0
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.