Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Including header file in project??

Including header file in project??

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionworkspace
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pri_skit
    wrote on last edited by
    #1

    I have application build in Embeded VC++ 4.0 project,now i want to include (.h) file in project which is produced from another (.exe) built in Win32(App) Console.I have added header file in project workspace.The problem is (.h) file is created after compiling the project.I want to include (.h) file before compilation of code because it is being used in project.Is there any way to do thing? I have tried by writing command in Custom build step: call "L:\11rvtsapril\ExcelCvt.exe"//(ExcelCvt.exe is Wn32 Console App) Is there any way to change Comipler option so that Cosole App(.exe) runs first,after that compilation of Application take place.Thanks in advance.

    priyank

    T C 2 Replies Last reply
    0
    • P pri_skit

      I have application build in Embeded VC++ 4.0 project,now i want to include (.h) file in project which is produced from another (.exe) built in Win32(App) Console.I have added header file in project workspace.The problem is (.h) file is created after compiling the project.I want to include (.h) file before compilation of code because it is being used in project.Is there any way to do thing? I have tried by writing command in Custom build step: call "L:\11rvtsapril\ExcelCvt.exe"//(ExcelCvt.exe is Wn32 Console App) Is there any way to change Comipler option so that Cosole App(.exe) runs first,after that compilation of Application take place.Thanks in advance.

      priyank

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      pri_skit wrote:

      The problem is (.h) file is created after compiling the project

      that's impossible !!! the .obj, .lib, .dll or .exe are, but not .h, .c or .cpp because they are the SOURCE of a program !


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      P C 2 Replies Last reply
      0
      • T toxcct

        pri_skit wrote:

        The problem is (.h) file is created after compiling the project

        that's impossible !!! the .obj, .lib, .dll or .exe are, but not .h, .c or .cpp because they are the SOURCE of a program !


        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

        P Offline
        P Offline
        pri_skit
        wrote on last edited by
        #3

        When i run Console Win 32 App,then it reads excel & converts it into file(which may be of any type .txt,.c,.cpp,.h).This file needs to be used in another project Embedded VC++ 4.0(MFC Supported).How this could be done? This shold happen: When i compile Embedded VC++ 4.0(MFC Supported) Application,then it automatically runs another .exe (Win 32 Cosole App) first,which in turn generate a file & this file needs to be used in project. Is there any more clarification required????

        priyank

        T 1 Reply Last reply
        0
        • P pri_skit

          I have application build in Embeded VC++ 4.0 project,now i want to include (.h) file in project which is produced from another (.exe) built in Win32(App) Console.I have added header file in project workspace.The problem is (.h) file is created after compiling the project.I want to include (.h) file before compilation of code because it is being used in project.Is there any way to do thing? I have tried by writing command in Custom build step: call "L:\11rvtsapril\ExcelCvt.exe"//(ExcelCvt.exe is Wn32 Console App) Is there any way to change Comipler option so that Cosole App(.exe) runs first,after that compilation of Application take place.Thanks in advance.

          priyank

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          It depends of the IDE you are using. But in general, you have several options. The easiest one, is to open the "Tool Build Order" option (in the 'Project' menu, for VC2005) and move the custom build tool before. Or instead of using a custom build step, you can use the 'Build events' specify your command line to be executed in the 'Pre-Build Event'. The last option is a little bit more complex: you can create a custom build rule yourself and so create a new 'tool'. But that's is a little bit comlicated.


          Cédric Moonen Software developer
          Charting control [v1.2 - Updated]

          1 Reply Last reply
          0
          • P pri_skit

            When i run Console Win 32 App,then it reads excel & converts it into file(which may be of any type .txt,.c,.cpp,.h).This file needs to be used in another project Embedded VC++ 4.0(MFC Supported).How this could be done? This shold happen: When i compile Embedded VC++ 4.0(MFC Supported) Application,then it automatically runs another .exe (Win 32 Cosole App) first,which in turn generate a file & this file needs to be used in project. Is there any more clarification required????

            priyank

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            WTF does excel come to do here ? :confused: can you talk a little more about that file content ?


            [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

            P 1 Reply Last reply
            0
            • T toxcct

              pri_skit wrote:

              The problem is (.h) file is created after compiling the project

              that's impossible !!! the .obj, .lib, .dll or .exe are, but not .h, .c or .cpp because they are the SOURCE of a program !


              [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

              C Offline
              C Offline
              Cedric Moonen
              wrote on last edited by
              #6

              toxcct wrote:

              that's impossible !!!

              That is possible. Sometimes, some header files and source files are generated by external tools. An example is when you use CORBA (it is a technology that allows you to make calls on a remote class, something similar to DCOM i think). You need to provide an IDL file (Interface Description Language). From this file, a specific CORBA compiler will generate header files and source files that need to be used by your program. So, it is logical that this tool is executed before the compilation of your program.


              Cédric Moonen Software developer
              Charting control [v1.2 - Updated]

              T 1 Reply Last reply
              0
              • T toxcct

                WTF does excel come to do here ? :confused: can you talk a little more about that file content ?


                [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                P Offline
                P Offline
                pri_skit
                wrote on last edited by
                #7

                Excel contains strings in 9 language.This (.exe) project(Win32) read excel & convert to file(containg CString str[]="Lang1",.,.,.,"lang7") format string.

                priyank

                1 Reply Last reply
                0
                • C Cedric Moonen

                  toxcct wrote:

                  that's impossible !!!

                  That is possible. Sometimes, some header files and source files are generated by external tools. An example is when you use CORBA (it is a technology that allows you to make calls on a remote class, something similar to DCOM i think). You need to provide an IDL file (Interface Description Language). From this file, a specific CORBA compiler will generate header files and source files that need to be used by your program. So, it is logical that this tool is executed before the compilation of your program.


                  Cédric Moonen Software developer
                  Charting control [v1.2 - Updated]

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #8

                  yes yes, i know about CORBA. but here, it seemed to me that the OP were not really of that advanced knowledge


                  [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups