C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-12-2006, 01:34 AM   #1
Registered User
 
Join Date: May 2006
Posts: 1,579
add source files to embedded VC 4.0

Hello everyone,


I am going to add some source files (.c, .cpp and .h) to a project in Microsoft embedded VC++ 4.0. There are a lot of source files and they are organized in their source tree file structure. I am wondering what is the most convenient way to add them all to an embedded VC++ project. Currently, I have to add them one by one (by "Add files to project" context menu of a project), which will break original source tree structure (which adds all the source files to "Source Files" folder in FileView).


thanks in advance,
George
George2 is offline   Reply With Quote
Old 06-12-2006, 03:47 AM   #2
Registered User
 
Join Date: Aug 2005
Posts: 1,265
>>Currently, I have to add them one by one
you don't have to add them one at a time -- just select all the files in the filelist provided.

Before adding any files, create the tree that you want to see in FileView. Just right-click on the SourceFiles folder and select "New Folder" option.
Ancient Dragon is offline   Reply With Quote
Old 06-13-2006, 12:14 AM   #3
Registered User
 
Join Date: May 2006
Posts: 1,579
Hi Ancient,


Quote:
Originally Posted by Ancient Dragon
>>Currently, I have to add them one by one
you don't have to add them one at a time -- just select all the files in the filelist provided.

Before adding any files, create the tree that you want to see in FileView. Just right-click on the SourceFiles folder and select "New Folder" option.
We have to create the folders one by one? I can not import a file structure which may contain several levels of folders?


regards,
George
George2 is offline   Reply With Quote
Old 06-13-2006, 12:48 AM   #4
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,706
If the IDE lacks an "import a tree" kind of function to create a project out of a source tree, then you could make your own.

Most IDE project files are text files, basically containing lists of text files and some other stuff. Create a few small project files and study them to get a feel of the format.

Then try and create your own, starting with the output of say
dir /b/s *.c *.cpp *.h

Even if the IDE can't import a directory, it may be able to import that file list

Personally, I'd use perl for this, but you make have other ideas.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 06-13-2006, 03:28 AM   #5
Registered User
 
Join Date: Aug 2005
Posts: 1,265
Quote:
Originally Posted by George2
Hi Ancient,

We have to create the folders one by one? I can not import a file structure which may contain several levels of folders?

regards,
George
Yes, you have to manually create the directory tree, then right-click on each folder you created, one by one, and select the files you want to include in that folder. Do that separately for source and header files. That works identical to all other Microsoft compilers.

Last edited by Ancient Dragon; 06-13-2006 at 03:32 AM.
Ancient Dragon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Source Files, make files, scope, include thetinman C++ Programming 13 11-05-2008 11:37 PM
added start menu crashes game avgprogamerjoe Game Programming 6 08-29-2007 01:30 PM
using a class in multiple source files??? Crossbow C++ Programming 9 06-18-2002 07:42 PM
linking source files estranged C Programming 9 04-03-2002 06:38 PM
How to implement several source files? Gades C Programming 3 11-21-2001 02:44 PM


All times are GMT -6. The time now is 11:39 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22