Commandline app built with visual studio 9 does not take *.NEF as input while same app built with gcc does - why?
I built dcraw.c (http://www.cybercom.net/~dcoffin/dcraw/dcraw.c) as a windows command line application with cygwin / gcc before. Today I built it with visual studio 2008 as that 开发者_JS百科allows including the libraries LIBJPEG and LCMS into the exe file and does not require the cygwin1.dll either. Also the VC built version seems to be faster. So much for the prelude.
The actual question is this: When I use the final application say as in dcraw -T -4 *.NEF The cygwin / gcc built version will process all NEF files in my directory while the visual studio built one says: *.NEF: Invalid argument
I have no idea why that is and am looking for a way to fix this. Any help would be greatly appreciated.
I believe you need to add setargv.obj
to be linked in. It will expand the wildcards. If you are using the command line (cl.exe), you can just specify it on the command line:
cl yourfile.c /link setargv.obj
In a Visual Studio project, you can add it to the Additional Dependencies field in the Linker Input options in the project properties.
Are you running both builds from the same type of command interpreter? On Unix systems, the shell expands wildcards; Windows cmd.exe
doesn't, leaving it to the program to do if necessary. If you're running one build from cmd
and the other from Cygwin's bash
, that could explain the different behaviors.
精彩评论