Menu

How to compile two programs at once??

luc
2007-09-30
2012-09-26
  • luc

    luc - 2007-09-30

    like when you have a class and you need to compile both the program and the constructor?

    thanks.

     
    • Anonymous

      Anonymous - 2007-10-01

      I am not sure about this "cpp file and a constructer (which is also a cpp file)." thing.

      A constructor is simply a member function of a class - I am not sure how this necessarily relates to compilation unit organisation.

       
    • Wayne Keen

      Wayne Keen - 2007-09-30

      Slow down a bit. Do you mean two programs or two files?

      For compiling multiple files (.cpp and .h) into a single application,
      you use a "Project"

      There is not mechanism within Dev analagous to the "Solution" idea
      that visual studio uses that may have multiple exes.

      Wayne

       
    • luc

      luc - 2007-10-01

      Oops sorry about that. I may have been a bit vague. What I meant was, how do you compile two cpp's together? NOT the exe's.

      Like how do you compile a cpp file and a constructer (which is also a cpp file).

      I believe if I were in unix, the command would be: g++ pro.cpp constructer.cpp

      I just wanna know how I would go about doing that in Dev-C++. And if the answer is use a project, could you please provide a little more detail? Thanks.

       
    • Wayne Keen

      Wayne Keen - 2007-10-01

      Create a New:Project - and simply add your source code to it.

      Bump around through the menus - it will be obvious what I am mumbling about. There
      are a number of "Template" projects that come with Dev and the Dev-Packs that can
      show you how things work.

      Much like what you know from the Unix world, the IDE will create a makefile that
      will work with "make" to link it all together.

      Wayne

       
    • luc

      luc - 2007-10-01

      Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.