Hi,

I am new to Visual Studio.
We have some C++ source code along with some Lex/yacc files.
Till now, we used to build on Linux.

The source code is arranged in several folders and there is a makefile
for each folder.
The toplevel makefile calls make on each folder and then builds the
final executable.

I need to transfer this C++ source code onto Visual Studio to build it
for windows and
to use the Visual Studio's debugger.
(I tried building on CL compiler using the makefile but could not make
a debug build after trying
all the debug options like /Zi /Z7 etc.)

Can somebody tell me how I can import this whole directory structure
into the Visual Studio ?
I do not want to manually create the several folders and then add
files to it.

Ideally, It would be so good if Visual Studio could take
in the Makefile and then create the directory structure itself.
Can this be done ?

Re: How to import an existing folder into Visual Studio by Alexander

Alexander
Thu Jan 03 12:50:26 CST 2008

You don't need to create new folders, just add all your existing
files to a single VC project. Unlike make, VC projects can gather
files from a multitude of folders. You will have to add configuration
information and list all of your folders relatively to the project for
it to find the headers, though that's not exactly unlike Unix. It's the
Additional Include Directories setting under the compiler settings
in the General tab. BTW, as you've already guessed no doubt, this
is manual work. Again - just like in Unix...

A word of caution - unless you've religiously folowed ANSI, don't
expect your code to magically compile the first time. You'll likely
have some porting to do...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"frust" <sgiitnewid@gmail.com> wrote in message
news:fdc9f231-e142-41b2-b7a9-8dfda4fff9d4@e23g2000prf.googlegroups.com...
> Hi,
>
> I am new to Visual Studio.
> We have some C++ source code along with some Lex/yacc files.
> Till now, we used to build on Linux.
>
> The source code is arranged in several folders and there is a makefile
> for each folder.
> The toplevel makefile calls make on each folder and then builds the
> final executable.
>
> I need to transfer this C++ source code onto Visual Studio to build it
> for windows and
> to use the Visual Studio's debugger.
> (I tried building on CL compiler using the makefile but could not make
> a debug build after trying
> all the debug options like /Zi /Z7 etc.)
>
> Can somebody tell me how I can import this whole directory structure
> into the Visual Studio ?
> I do not want to manually create the several folders and then add
> files to it.
>
> Ideally, It would be so good if Visual Studio could take
> in the Makefile and then create the directory structure itself.
> Can this be done ?
>



Re: How to import an existing folder into Visual Studio by frust

frust
Fri Jan 04 00:43:33 CST 2008

Reading all this info from a makefile would be a great feature in any
tool I guess.
Isn' t it ?
That way, people can easily port their existing projects into VC,
though offcourse, some
work will go into fixing non-ANSI stuff but yet, manual addition to
automatic would be great.
Also, if reading from makefile, then VC should also be able to set
compiler options for each file etc.
Aneways, sounds like a lot of work ahead !

On Jan 3, 11:50 pm, "Alexander Nickolov" <agnicko...@mvps.org> wrote:
> You don't need to create new folders, just add all your existing
> files to a single VC project. Unlike make, VC projects can gather
> files from a multitude of folders. You will have to add configuration
> information and list all of your folders relatively to the project for
> it to find the headers, though that's not exactly unlike Unix. It's the
> Additional Include Directories setting under the compiler settings
> in the General tab. BTW, as you've already guessed no doubt, this
> is manual work. Again - just like in Unix...
>
> A word of caution - unless you've religiously folowed ANSI, don't
> expect your code to magically compile the first time. You'll likely
> have some porting to do...
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnicko...@mvps.org
> MVP VC FAQ:http://vcfaq.mvps.org
> =====================================
>
> "frust" <sgiitne...@gmail.com> wrote in message
>
> news:fdc9f231-e142-41b2-b7a9-8dfda4fff9d4@e23g2000prf.googlegroups.com...
>
> > Hi,
>
> > I am new to Visual Studio.
> > We have some C++ source code along with some Lex/yacc files.
> > Till now, we used to build on Linux.
>
> > The source code is arranged in several folders and there is a makefile
> > for each folder.
> > The toplevel makefile calls make on each folder and then builds the
> > final executable.
>
> > I need to transfer this C++ source code onto Visual Studio to build it
> > for windows and
> > to use the Visual Studio's debugger.
> > (I tried building on CL compiler using the makefile but could not make
> > a debug build after trying
> > all the debug options like /Zi /Z7 etc.)
>
> > Can somebody tell me how I can import this whole directory structure
> > into the Visual Studio ?
> > I do not want to manually create the several folders and then add
> > files to it.
>
> > Ideally, It would be so good if Visual Studio could take
> > in the Makefile and then create the directory structure itself.
> > Can this be done ?


Re: How to import an existing folder into Visual Studio by frust

frust
Fri Jan 04 05:30:18 CST 2008

I dont think this can be done manually.
There are thousands of files and 10s of folders.
I am planning to use the cl compiler of Visual Studio and then find
its debugger to debug it.


On Jan 4, 11:43 am, frust <sgiitne...@gmail.com> wrote:
> Reading all this info from a makefile would be a great feature in any
> tool I guess.
> Isn' t it ?
> That way, people can easily port their existing projects into VC,
> though offcourse, some
> work will go into fixing non-ANSI stuff but yet, manual addition to
> automatic would be great.
> Also, if reading from makefile, then VC should also be able to set
> compiler options for each file etc.
> Aneways, sounds like a lot of work ahead !
>
> On Jan 3, 11:50 pm, "Alexander Nickolov" <agnicko...@mvps.org> wrote:
>
> > You don't need to create new folders, just add all your existing
> > files to a single VC project. Unlike make, VC projects can gather
> > files from a multitude of folders. You will have to add configuration
> > information and list all of your folders relatively to the project for
> > it to find the headers, though that's not exactly unlike Unix. It's the
> > Additional Include Directories setting under the compiler settings
> > in the General tab. BTW, as you've already guessed no doubt, this
> > is manual work. Again - just like in Unix...
>
> > A word of caution - unless you've religiously folowed ANSI, don't
> > expect your code to magically compile the first time. You'll likely
> > have some porting to do...
>
> > --
> > =====================================
> > Alexander Nickolov
> > Microsoft MVP [VC], MCSD
> > email: agnicko...@mvps.org
> > MVP VC FAQ:http://vcfaq.mvps.org
> > =====================================
>
> > "frust" <sgiitne...@gmail.com> wrote in message
>
> >news:fdc9f231-e142-41b2-b7a9-8dfda4fff9d4@e23g2000prf.googlegroups.com...
>
> > > Hi,
>
> > > I am new to Visual Studio.
> > > We have some C++ source code along with some Lex/yacc files.
> > > Till now, we used to build on Linux.
>
> > > The source code is arranged in several folders and there is a makefile
> > > for each folder.
> > > The toplevel makefile calls make on each folder and then builds the
> > > final executable.
>
> > > I need to transfer this C++ source code onto Visual Studio to build it
> > > for windows and
> > > to use the Visual Studio's debugger.
> > > (I tried building on CL compiler using the makefile but could not make
> > > a debug build after trying
> > > all the debug options like /Zi /Z7 etc.)
>
> > > Can somebody tell me how I can import this whole directory structure
> > > into the Visual Studio ?
> > > I do not want to manually create the several folders and then add
> > > files to it.
>
> > > Ideally, It would be so good if Visual Studio could take
> > > in the Makefile and then create the directory structure itself.
> > > Can this be done ?


Re: How to import an existing folder into Visual Studio by Alexander

Alexander
Fri Jan 04 13:38:43 CST 2008

Well, you can write a tool to do this for you. The project file
is simply a text file after all. If you are being extra careful,
you should be able to manage that. We do edit our vcproj files
by hand occasionally...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"frust" <sgiitnewid@gmail.com> wrote in message
news:d67f6052-e212-44c1-8b3f-83da69f99dd4@u10g2000prn.googlegroups.com...
>I dont think this can be done manually.
> There are thousands of files and 10s of folders.
> I am planning to use the cl compiler of Visual Studio and then find
> its debugger to debug it.
>
>
> On Jan 4, 11:43 am, frust <sgiitne...@gmail.com> wrote:
>> Reading all this info from a makefile would be a great feature in any
>> tool I guess.
>> Isn' t it ?
>> That way, people can easily port their existing projects into VC,
>> though offcourse, some
>> work will go into fixing non-ANSI stuff but yet, manual addition to
>> automatic would be great.
>> Also, if reading from makefile, then VC should also be able to set
>> compiler options for each file etc.
>> Aneways, sounds like a lot of work ahead !
>>
>> On Jan 3, 11:50 pm, "Alexander Nickolov" <agnicko...@mvps.org> wrote:
>>
>> > You don't need to create new folders, just add all your existing
>> > files to a single VC project. Unlike make, VC projects can gather
>> > files from a multitude of folders. You will have to add configuration
>> > information and list all of your folders relatively to the project for
>> > it to find the headers, though that's not exactly unlike Unix. It's the
>> > Additional Include Directories setting under the compiler settings
>> > in the General tab. BTW, as you've already guessed no doubt, this
>> > is manual work. Again - just like in Unix...
>>
>> > A word of caution - unless you've religiously folowed ANSI, don't
>> > expect your code to magically compile the first time. You'll likely
>> > have some porting to do...
>>
>> > --
>> > =====================================
>> > Alexander Nickolov
>> > Microsoft MVP [VC], MCSD
>> > email: agnicko...@mvps.org
>> > MVP VC FAQ:http://vcfaq.mvps.org
>> > =====================================
>>
>> > "frust" <sgiitne...@gmail.com> wrote in message
>>
>> >news:fdc9f231-e142-41b2-b7a9-8dfda4fff9d4@e23g2000prf.googlegroups.com...
>>
>> > > Hi,
>>
>> > > I am new to Visual Studio.
>> > > We have some C++ source code along with some Lex/yacc files.
>> > > Till now, we used to build on Linux.
>>
>> > > The source code is arranged in several folders and there is a
>> > > makefile
>> > > for each folder.
>> > > The toplevel makefile calls make on each folder and then builds the
>> > > final executable.
>>
>> > > I need to transfer this C++ source code onto Visual Studio to build
>> > > it
>> > > for windows and
>> > > to use the Visual Studio's debugger.
>> > > (I tried building on CL compiler using the makefile but could not
>> > > make
>> > > a debug build after trying
>> > > all the debug options like /Zi /Z7 etc.)
>>
>> > > Can somebody tell me how I can import this whole directory structure
>> > > into the Visual Studio ?
>> > > I do not want to manually create the several folders and then add
>> > > files to it.
>>
>> > > Ideally, It would be so good if Visual Studio could take
>> > > in the Makefile and then create the directory structure itself.
>> > > Can this be done ?
>