Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

log filename including compiler, version, linker and debug or release ?

<< < (2/7) > >>

pabristow:
1  No it doesn't request write permission.

2 I've added the line into the script console sans [[ ]] (shown - hope you have a wide screen ;-) ) but it doesn't like it.
See message box (not obvious to me what is wrong from this).

(But I start to get the idea - it's just getting the details exactly right?)

Thanks



BlueHazzard:
ok, this error is somehow expected, because
--- Code: ---GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget()
--- End code ---
is probably null if you run this code in the command line

What about the other things?

--- Quote ---Have you tried to copy it in the project build options for testing?
What version of codeblocks do you use?

--- End quote ---
Please post a rebuild log if possible (build->Rebuild and then post the content of the "build log" tab here. And please use code tags for this (the # symbol in the post editor))
What if you put a simple
--- Code: --- [[Log(_("test"))]]
--- End code ---
in the pre or post build steps? Does it show in the codeblocks log tab?

pabristow:
I am using Codeblocks 17.12, the latest as I understand it.

A hello_world-ish program build (standard settings) has a Build log thus:


--- Code: ---
-------------- Clean: Debug_clang900 in hello_exceptions (compiler: LLVM Clang 900 Compiler)---------------

Cleaned "hello_exceptions - Debug_clang900"

-------------- Build: Debug_clang900 in hello_exceptions (compiler: LLVM Clang 900 Compiler)---------------

clang++.exe -g --verbose  -c I:\Cpp\hello_boost\hello_exceptions\hello_exceptions.cpp -o obj\Debug\hello_exceptions.o
clang++.exe  -o bin\Debug\hello_exceptions.exe obj\Debug\hello_exceptions.o   
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\LLVM\clang-900\LLVM\bin
 "C:\\LLVM\\clang-900\\LLVM\\bin\\clang++.exe" -cc1 -triple x86_64-pc-windows-msvc19.24.28207 -emit-obj -mrelax-all -mincremental-linker-compatible -disable-free -disable-llvm-verifier -discard-value-names -main-file-name hello_exceptions.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -gcodeview -debug-info-kind=limited -momit-leaf-frame-pointer -v -coverage-notes-file "I:\\Cpp\\hello_boost\\hello_exceptions\\obj\\Debug\\hello_exceptions.gcno" -resource-dir "C:\\LLVM\\clang-900\\LLVM\\lib\\clang\\9.0.0" -internal-isystem "C:\\LLVM\\clang-900\\LLVM\\lib\\clang\\9.0.0\\include" -internal-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\VC\\Tools\\MSVC\\14.24.28207\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\winrt" -fdeprecated-macro -fdebug-compilation-dir "I:\\Cpp\\hello_boost\\hello_exceptions" -ferror-limit 19 -fmessage-length 0 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.24.28207 -std=c++14 -fdelayed-template-parsing -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -faddrsig -o "obj\\Debug\\hello_exceptions.o" -x c++ "I:\\Cpp\\hello_boost\\hello_exceptions\\hello_exceptions.cpp"
clang -cc1 version 9.0.0 based upon LLVM 9.0.0 default target x86_64-pc-windows-msvc
#include "..." search starts here:
#include <...> search starts here:
 C:\LLVM\clang-900\LLVM\lib\clang\9.0.0\include
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.24.28207\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt
End of search list.
Output file is bin\Debug\hello_exceptions.exe with size 231.00 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Build log saved as:
file://I:/Cpp/hello_boost/hello_exceptions/hello_exceptions_build_log.html
 

--- End code ---

I've put [[Log(_("test"))]]  in both pre and post builds (and ticked the alwasy execute, for good measure ;-) and the log is:



--- Code: ----------------- Clean: Debug_clang900 in hello_exceptions (compiler: LLVM Clang 900 Compiler)---------------

Cleaned "hello_exceptions - Debug_clang900"
Running target pre-build steps

-------------- Build: Debug_clang900 in hello_exceptions (compiler: LLVM Clang 900 Compiler)---------------

clang++.exe -g --verbose  -c I:\Cpp\hello_boost\hello_exceptions\hello_exceptions.cpp -o obj\Debug\hello_exceptions.o
clang++.exe  -o bin\Debug\hello_exceptions.exe obj\Debug\hello_exceptions.o   
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\LLVM\clang-900\LLVM\bin
 "C:\\LLVM\\clang-900\\LLVM\\bin\\clang++.exe" -cc1 -triple x86_64-pc-windows-msvc19.24.28207 -emit-obj -mrelax-all -mincremental-linker-compatible -disable-free -disable-llvm-verifier -discard-value-names -main-file-name hello_exceptions.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -gcodeview -debug-info-kind=limited -momit-leaf-frame-pointer -v -coverage-notes-file "I:\\Cpp\\hello_boost\\hello_exceptions\\obj\\Debug\\hello_exceptions.gcno" -resource-dir "C:\\LLVM\\clang-900\\LLVM\\lib\\clang\\9.0.0" -internal-isystem "C:\\LLVM\\clang-900\\LLVM\\lib\\clang\\9.0.0\\include" -internal-isystem "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview\\VC\\Tools\\MSVC\\14.24.28207\\include" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\ucrt" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\shared" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\um" -internal-isystem "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.18362.0\\winrt" -fdeprecated-macro -fdebug-compilation-dir "I:\\Cpp\\hello_boost\\hello_exceptions" -ferror-limit 19 -fmessage-length 0 -fno-use-cxa-atexit -fms-extensions -fms-compatibility -fms-compatibility-version=19.24.28207 -std=c++14 -fdelayed-template-parsing -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -faddrsig -o "obj\\Debug\\hello_exceptions.o" -x c++ "I:\\Cpp\\hello_boost\\hello_exceptions\\hello_exceptions.cpp"
clang -cc1 version 9.0.0 based upon LLVM 9.0.0 default target x86_64-pc-windows-msvc
#include "..." search starts here:
#include <...> search starts here:
 C:\LLVM\clang-900\LLVM\lib\clang\9.0.0\include
 C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.24.28207\include
 C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um
 C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt
End of search list.
Output file is bin\Debug\hello_exceptions.exe with size 231.00 KB
Running target post-build steps
Nothing to be done (all items are up-to-date).

--- End code ---

I note

--- Code: ---Running target pre-build steps
--- End code ---

--- Code: ---Running target post-build steps
--- End code ---

and


--- Code: ---Nothing to be done (all items are up-to-date).
--- End code ---

Is the trouble that this is over-riding the production of a .html log at all?

Thanks for your continued help.

PS I'd like to have an icon to click that *always* 'Rebuild and run' (I find that the' Build and run' does rebuild when I think it should rebuild).   

stahta01:
The pre/post for the target or for the project?
If target which target?

Tim S.

stahta01:
Did you check the codeblocks tab instead of the build log tab?

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version