Incorporation C files into MSVC++

This is a discussion on Incorporation C files into MSVC++ within the Windows Programming forums, part of the Platform Specific Boards category; I have received a number of different pieces of C code and their header files together with a number of ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    9

    Question Incorporation C files into MSVC++

    I have received a number of different pieces of C code and their header files together with a number of .dll library files on which they depend. Together they form a C application.
    I have MSVC++ version 6.
    How do I take these pieces of code, incorporate them into MSVC++, and compile them to make an executable program?
    (The C code was generated from Matlab compiling through the MSVC++ compiler).

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001

    should work

    create a new application (win32 or win32 console) use any options you want(no premade source however). When the workspace is open, select file, open, whatever c file you need. then when it's in the right pane, right click it and select add to project, and select the name of the current project. Do the same with the headers and other C files. Make sure that there is only one main function throughout the c files. As for the dll's, i think you can statically link to them when designing your project during creation (not sure how to do it with win32 console though). Good luck.
    PHP and XML
    Let's talk about SAX

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,853
    Do you have the import libraries for the DLL's?

    In otherwords are you going to link the DLL's explicitly (at build time with the import libraries) or implicitly (as needed during runtime by getting the address of the functions)?



    >>then when it's in the right pane, right click it and select add to project, and select the name of the current project.

    I just use PROJECT->ADD TO PROJECT->FILES. Then you can select all the files in a folder or filter on type (ie .c, .h) and add all to the project in one go.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 07:53 AM
  2. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  3. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 06:55 AM
  4. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 08:36 AM
  5. opening multiple files sequentially
    By moonwalker in forum C Programming
    Replies: 5
    Last Post: 08-20-2002, 09:57 PM

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