Menu

Compiling with subsystem.

2007-04-02
2012-09-26
  • Nobody/Anonymous

    Hi,
    For a project I am doing I need to compile using the '/SUBSYSTEM:NATIVE' linker option. However, when I put this in the linker (Project -> Project Options -> Parameters -> Linker) I only get the posted error. Any help?

    (also using Dev-C++ 4.9.9.2)
    [error]
    Compiler: Default compiler
    Building Makefile: "C:\DevProjects\dt\Makefile.win"
    Executing make clean
    rm -f main.o DriverTest.exe

    g++.exe -D__DEBUG__ -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -ansi -traditional-cpp -fdollar-in-identifiers -fexceptions -fexpensive-optimizations -O3 -pg -g3

    cc1plus.exe: error: unrecognized command line option "-fdollar-in-identifiers"

    make.exe: *** [main.o] Error 1

    Execution terminated
    [error]

     
    • Anonymous

      Anonymous - 2007-04-04

      I imagine you are thinking of a different linker. GNU linker options (in common with all GNU tools) are prefixed with - rather than /.

      Some obvious googling ( "linker options SUBSYSTEM NATIVE DRIVER WDM" ), indicate that these are VC++ linker options, and are used to build a kernel mode driver.

      The obvious thing that no one has mentioned so far is that in your first log you were not even using these options! But you were using many other non-default options. In general, do not modify any options unless and until you need to, and certainly do not modify any that you don't know what they do.

      The GNU linker documentation is at: http://www.gnu.org/software/binutils/manual/ld-2.9.1/ld.html. The compiler documentation is at: http://gcc.gnu.org/onlinedocs/

      Whether MinGW/GCC is a suitable tool chain for device driver development I cannot say (because I don't know), but it seems that you seem unsure exactly what tool chain you are even using, so I would suggest that at best you are ill-equipped for the task.

      Clifford

       
    • Wayne Keen

      Wayne Keen - 2007-04-02

      The compiler option "fdollar-in-identifiers" has been removed from the compiler. You need to get it out of your compile options.

      Wayne

       
      • Nobody/Anonymous

        Where do I find this? Looking threw the options, I see nothing.

         
    • Wayne Keen

      Wayne Keen - 2007-04-02

      Did it come in with your "Native" option?

      Wayne

       
    • Nobody/Anonymous

      Oh, Just compiled without the native, still there; Other project still works fine.

       
    • Wayne Keen

      Wayne Keen - 2007-04-02

      Then one of two things seems to be happening:

      (1) It is explicitly set in either your project options, or your tools:compiler otions.

      (2) It is implicitly set by some other option in one of those two places.

      Wayne

       
      • Nobody/Anonymous

        IT doesn't seem to be in either, and I defaulted all of the compiler options. Could this be caused by me choosing a blank project at the start?

         
        • Wayne Keen

          Wayne Keen - 2007-04-02

          I don't think so.

          That option is NOT set by default. I do seem to recall that some folks have reported
          an issue with that option getting set through some form of poltergeist phenomenon,
          a forum search may well be fruitful. search on the dollar sign option.

          Did you check over in your Tools:Compiler Options as well as in your project options?

          Wayne

           
          • Nobody/Anonymous

            Found it, thanks.

             
            • Nobody/Anonymous

              Still getting a error using this thought.

              /SUBSYSTEM:NATIVE /DRIVER:WDM –entry:DriverEntry

               
              • Nobody/Anonymous

                GAH!!! Didn't past right..

                g++.exe -D__DEBUG__ main.o -o "DriverTest.exe" -L"C:/Dev-Cpp/lib" /SUBSYSTEM:NATIVE /DRIVER:WDM --entry:DriverEntry -lgmon -pg -g3

                g++.exe: /SUBSYSTEM:NATIVE: No such file or directory
                g++.exe: /DRIVER:WDM: No such file or directory

                 
                • Wayne Keen

                  Wayne Keen - 2007-04-02

                  Now, at the risk of indicating that I started asking the questions backwards - and looking really dumb - what is this SUBSYSTEM command supposed to be - I did not find it in a quick grep of the manpage for GCC.

                  Wayne

                   
                  • Wayne Keen

                    Wayne Keen - 2007-04-02

                    I see references in some quick (and very stupid) googling to the syntax looking something like this:

                    --subsystem "native"

                    But this may have bloody nothing to do with anything.

                    Wayne

                     

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.