Search code examples
cdebuggingvisual-c++compilationvisual-studio-debugging

How to start running with MSVC


Starting from the beginning !! can anybody here help me how to start running C project with MSVC ?

I have all the source files under:

src/ directory

all the header files under:

inc/ directory 

and few of the source under:

test/ directory

test directory contains makefile for the project

How can I use the same setup in MSVC for compilation and debugging ?


Solution

  • Off the top of my head,

    1. Create a workspace. Determine whether your application is a command-line, GUI, DLL, etc.
    2. Create a project (or projects depending on how your application is structured).
    3. Add each file to the appropriate project.
    4. Set compiler options if any.
    5. Compile and fix any portability issues (such as compiler directives).

    Regarding your makefile, check out this Stack Overflow answer which talks about cccl.

    cccl is a wrapper around Microsoft Visual C++'s cl.exe and link.exe. It converts Unix compiler parameters into parameters understood by cl and link.