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
cc1plus.exe: error: unrecognized command line option "-fdollar-in-identifiers"
make.exe: *** [main.o] Error 1
Execution terminated [error]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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]
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
The compiler option "fdollar-in-identifiers" has been removed from the compiler. You need to get it out of your compile options.
Wayne
Where do I find this? Looking threw the options, I see nothing.
Did it come in with your "Native" option?
Wayne
Oh, Just compiled without the native, still there; Other project still works fine.
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
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?
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
Found it, thanks.
Still getting a error using this thought.
/SUBSYSTEM:NATIVE /DRIVER:WDM –entry:DriverEntry
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
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
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