• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Bloody compilers

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Bloody compilers

    FFS

    I have a simple exe that I was compiling

    gcc -o mylittleapp.exe main.c otherfile.c

    Now one of the headers needs to use headers in the SDK

    Fair enough

    I get a compile error saying WTF is this header file

    eg other.c has a header file called other.h

    other.h has the line

    #include "someSDKheader.h"

    So I need to include the path to these headers in my search paths right?

    Fraking how????

    Lets say the headers live in C:\Windows SDK\include

    I would need to adjust my compile command to

    gcc -o -IC:/Windows SDK/include mylittleapp.exe main.c otherfile.c

    right?

    So WTF doesn't it work?

    I still get

    someSDKheader.h file not found

    Why? I have included the search path?

    Knock first as I might be balancing my chakras.

    #2
    Do you maybe need " marks around the path, because it has a space in it?

    Comment


      #3
      Originally posted by ee61re View Post
      Do you maybe need " marks around the path, because it has a space in it?
      Thanks for the reply. I tried it. And I copied the header files to a location with no spaces and tried that.

      I am creating a custom header file for the moment to satisfy my requirements, but that is terrible really.
      Knock first as I might be balancing my chakras.

      Comment


        #4
        Get Visual Studio C++ (and Intel C++ on top of it if you are really serious) and you won't have to mess about with command line...

        Comment


          #5
          I like how you post a "hard C question" and then post this.

          Can't even compile my-first-noddy.exe

          Comment


            #6
            Originally posted by DimPrawn View Post
            I like how you post a "hard C question" and then post this.

            Can't even compile my-first-noddy.exe



            MY-FIR~1.EXE

            Comment


              #7
              I think you need individual -I's, one for each include path, and I would want the -o in front of the target file name.

              Comment


                #8
                Hactually this is one of many module that comprise my plan B

                I have successfully compiled all of my modules without problem.

                This one module is being a sod.

                DP, you'll notice how I have implemented a work around using my own nous. This is real coding, not just plugging .net widgets together.

                HTH
                Knock first as I might be balancing my chakras.

                Comment


                  #9
                  Originally posted by ee61re View Post
                  Do you maybe need " marks around the path, because it has a space in it?
                  And you do need the quotes. Standard DOS requirement.
                  Last edited by OrangeHopper; 1 November 2009, 17:23.

                  Comment


                    #10
                    Originally posted by suityou01 View Post
                    Hactually this is one of many module that comprise my plan B

                    I have successfully compiled all of my modules without problem.

                    This one module is being a sod.

                    DP, you'll notice how I have implemented a work around using my own nous. This is real coding, not just plugging .net widgets together.

                    HTH


                    Code Monkey work

                    Comment

                    Working...
                    X