我在沒有IDE的機器上構建了一些相當大的代碼,但是使用Notepad ++。可以將Notepad ++配置爲識別編譯器錯誤消息並跳轉到相應位置?
編譯結果重定向到一個文件,有時,有錯誤消息,其滿足一個良好定義的正則表達式。
不知NPP有一個插件,它會分析日誌文件,認識到錯誤/警告messagess,讓我相應的錯誤/警告位置之間進行導航。
編輯
這裏是輸出(由make生產運行的cl.exe MSVC編譯器)的一個典型的例子:
/cygdrive/c/vs2010/VC/Bin/cl -Zi -nologo -MD /D _STATIC_CPPLIB -FdC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/Win32SurfaceData.pdb -FmC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/Win32SurfaceData.map -W3 -DD3D_OVERLOADS -DUNICODE -D_UNICODE -DWIN32 -DIAL -D_LITTLE_ENDIAN -DWIN32 -D_X86_ -Dx86 -DWIN32_LEAN_AND_MEAN -I. -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders -I../../../src/windows/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/windows/javavm/include -I../../../src/share/native/common -I../../../src/windows/native/common -I../../../src/share/native/sun/awt -I../../../src/windows/native/sun/awt -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders/../../java/jvm -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj -I../../../src/share/native/common -I../../../src/windows/native/sun/windows -IC:/PROGRA~2/MICROS~1/Include -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/java2d/loops -I../../../src/share/native/sun/java2d -I../../../src/windows/native/sun/java2d -I../../../src/share/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/d3d -I../../../src/windows/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/windows -I../../../src/share/native/sun/font -I../../../src/share/native/sun/java2d/pipe -I../../../src/share/native/sun/dc/path -I../../../src/share/native/sun/dc/doe -I../../../src/share/native/sun/awt/debug -I../../../src/windows/native/sun/awt -I../../../src/share/native/sun/awt/medialib -DINTERNAL_BUILD -c -FoC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/Win32SurfaceData.obj ../../../src/windows/native/sun/awt/../java2d/windows/Win32SurfaceData.cpp
Win32SurfaceData.cpp
../../../src/windows/native/sun/awt/../java2d/windows/Win32SurfaceData.cpp(478) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
/cygdrive/c/vs2010/VC/Bin/cl -Zi -nologo -MD /D _STATIC_CPPLIB -FdC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WinBackBufferSurfaceData.pdb -FmC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WinBackBufferSurfaceData.map -W3 -DD3D_OVERLOADS -DUNICODE -D_UNICODE -DWIN32 -DIAL -D_LITTLE_ENDIAN -DWIN32 -D_X86_ -Dx86 -DWIN32_LEAN_AND_MEAN -I. -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders -I../../../src/windows/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/windows/javavm/include -I../../../src/share/native/common -I../../../src/windows/native/common -I../../../src/share/native/sun/awt -I../../../src/windows/native/sun/awt -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders/../../java/jvm -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj -I../../../src/share/native/common -I../../../src/windows/native/sun/windows -IC:/PROGRA~2/MICROS~1/Include -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/java2d/loops -I../../../src/share/native/sun/java2d -I../../../src/windows/native/sun/java2d -I../../../src/share/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/d3d -I../../../src/windows/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/windows -I../../../src/share/native/sun/font -I../../../src/share/native/sun/java2d/pipe -I../../../src/share/native/sun/dc/path -I../../../src/share/native/sun/dc/doe -I../../../src/share/native/sun/awt/debug -I../../../src/windows/native/sun/awt -I../../../src/share/native/sun/awt/medialib -DINTERNAL_BUILD -c -FoC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WinBackBufferSurfaceData.obj ../../../src/windows/native/sun/awt/../java2d/windows/WinBackBufferSurfaceData.cpp
WinBackBufferSurfaceData.cpp
/cygdrive/c/vs2010/VC/Bin/cl -Zi -nologo -MD /D _STATIC_CPPLIB -FdC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WBufferStrategy.pdb -FmC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WBufferStrategy.map -W3 -DD3D_OVERLOADS -DUNICODE -D_UNICODE -DWIN32 -DIAL -D_LITTLE_ENDIAN -DWIN32 -D_X86_ -Dx86 -DWIN32_LEAN_AND_MEAN -I. -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders -I../../../src/windows/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/windows/javavm/include -I../../../src/share/native/common -I../../../src/windows/native/common -I../../../src/share/native/sun/awt -I../../../src/windows/native/sun/awt -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders/../../java/jvm -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj -I../../../src/share/native/common -I../../../src/windows/native/sun/windows -IC:/PROGRA~2/MICROS~1/Include -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/java2d/loops -I../../../src/share/native/sun/java2d -I../../../src/windows/native/sun/java2d -I../../../src/share/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/d3d -I../../../src/windows/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/windows -I../../../src/share/native/sun/font -I../../../src/share/native/sun/java2d/pipe -I../../../src/share/native/sun/dc/path -I../../../src/share/native/sun/dc/doe -I../../../src/share/native/sun/awt/debug -I../../../src/windows/native/sun/awt -I../../../src/share/native/sun/awt/medialib -DINTERNAL_BUILD -c -FoC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WBufferStrategy.obj ../../../src/windows/native/sun/windows/WBufferStrategy.cpp
WBufferStrategy.cpp
/cygdrive/c/vs2010/VC/Bin/cl -Zi -nologo -MD /D _STATIC_CPPLIB -FdC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WPrinterJob.pdb -FmC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WPrinterJob.map -W3 -DD3D_OVERLOADS -DUNICODE -D_UNICODE -DWIN32 -DIAL -D_LITTLE_ENDIAN -DWIN32 -D_X86_ -Dx86 -DWIN32_LEAN_AND_MEAN -I. -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders -I../../../src/windows/javavm/export -I../../../src/share/javavm/export -I../../../src/share/javavm/include -I../../../src/windows/javavm/include -I../../../src/share/native/common -I../../../src/windows/native/common -I../../../src/share/native/sun/awt -I../../../src/windows/native/sun/awt -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/CClassHeaders/../../java/jvm -IC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj -I../../../src/share/native/common -I../../../src/windows/native/sun/windows -IC:/PROGRA~2/MICROS~1/Include -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/java2d/loops -I../../../src/share/native/sun/java2d -I../../../src/windows/native/sun/java2d -I../../../src/share/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/d3d -I../../../src/windows/native/sun/java2d/opengl -I../../../src/windows/native/sun/java2d/windows -I../../../src/share/native/sun/font -I../../../src/share/native/sun/java2d/pipe -I../../../src/share/native/sun/dc/path -I../../../src/share/native/sun/dc/doe -I../../../src/share/native/sun/awt/debug -I../../../src/windows/native/sun/awt -I../../../src/share/native/sun/awt/medialib -DINTERNAL_BUILD -c -FoC:/openjdk/OUTPUT~1/tmp/sun/sun.awt/awt/obj/WPrinterJob.obj ../../../src/windows/native/sun/windows/WPrinterJob.cpp
WPrinterJob.cpp
../../../src/windows/native/sun/windows/WPrinterJob.cpp(74) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
../../../src/windows/native/sun/windows/WPrinterJob.cpp(117) : error C2664: 'JNIEnv_::NewString' : cannot convert parameter 1 from 'LPWSTR' to 'const jchar *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
../../../src/windows/native/sun/windows/WPrinterJob.cpp(142) : error C2664: 'JNIEnv_::NewString' : cannot convert parameter 1 from 'LPTSTR' to 'const jchar *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
你能發表一段包含錯誤的輸出嗎? - 我不知道任何插件,但有適當的正則表達式,你可以做一個「在文件中查找」,並列出所有錯誤及其各自的位置輸出。 – DeusAphor