Author Topic: [Resolved] Using cbp2make  (Read 3686 times)

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
[Resolved] Using cbp2make
« on: October 24, 2018, 07:01:54 pm »
Hello,

Am attempting to activate cbp2make (a tool included in CB) in Windows 10.  The output is shown below:

Code
Command line parameters:
string -in="C:\wxWidgets-3.1.1\samples\drawing\drawing_vc9.cbp";
string -out="Make";
bool -list=false;
string -cfg="";
string -indir="";
string -outdir="";
bool --help=false;
bool --verbose=true;
bool --quiet=false;
bool --version=false;
string --config="";
bool --local=false;
bool --global=false;
bool --add=false;
bool --remove=false;
string -set="default";
string -name="";
string -desc="";
string -field="base";
string -value="";
string -alias="gcc";
string -chain="vc_64-bit_compiler";
string -make="make";
string -tool="vc_64-bit_compiler";
string -type="cc";
string -desc="GNU C Compiler";
string -program="gcc";
string -command="$compiler $options $includes -c $file -o $object";
string -mkv="CC";
string -srcext="c";
string -outext="o";
string -quotepath="yes";
string -fullpath="no";
string -unixpath="no";
string -incsw="-I";
string -defsw="-D";
string -deps="yes";
string -ldsw="-L";
string -llsw="-l";
string -lext="a";
string -objext="o";
string -lflat="no";
bool -msys=false;
bool -unix=false;
bool -windows=true;
bool -mac=false;
bool --all-os=false;
bool --flat-objects=false;
bool --flat-objpath=false;
bool --wrap-objects=false;
bool --wrap-options=false;
bool --with-deps=false;
bool --keep-objdir=false;
bool --keep-outdir=false;
string --target-case="lower";
string --macros-case="upper";
string --quote-path="auto";
string --default-options="";
string -targets="Release x64";
string -pwd="pwd";
string -wd="`pwd`";
string -cd="cd $dir";
string -rm="rm $file";
string -rmf="rm -f $file";
string -rmd="rm -rf $dir";
string -cp="cp -p $src $dst";
string -mv="mv $src $dst";
string -md="mkdir $dir";
string -mdf="mkdir -p $dir";
bool ~-in=true;
bool ~-out=true;
bool ~-chain=true;
bool ~-tool=true;
bool ~-targets=true;
bool ~--verbose=true;
bool ~-windows=true;
Starting cbp2make rev.147...
Using default configuration.
Loading file 'C:\wxWidgets-3.1.1\samples\drawing\drawing_vc9.cbp': [DONE]
Loaded file is Code::Blocks project.
Project title: drawing
Project version: 1.6
Default target:
Default compiler: vc_64-bit_compiler
Compiler options: 0
Compiler directories: 0
Linker options: 0
Linker directories: 0
Linked libraries: 0
Build targets: 1
Target #1
Target title: Release x64
Platforms: 2
Platform #1: Windows
Platform #2: MSys
Binary output: vc_mswu_x64/drawing
Automatic prefix: yes
Automatic extension: yes
Working directory:
Object output: vc_mswu_x64/drawing
External dependencies: 0
Type: executable
Compiler: vc_64-bit_compiler
Compiler options relation: project target
Linker options relation: project target
Include directories relation: project target
Resource include directories relation: project target
Library directories relation: project target
Compiler options: 15
Option #1: /MD
Option #2: /O2
Option #3: /W4
Option #4: /Zi
Option #5: /MP
Option #6: /EHsc
Option #7: /DWIN32
Option #8: /D_CRT_SECURE_NO_DEPRECATE=1
Option #9: /D_CRT_NON_CONFORMING_SWPRINTFS=1
Option #10: /D_SCL_SECURE_NO_WARNINGS=1
Option #11: /D__WXMSW__
Option #12: /DNDEBUG
Option #13: /D_UNICODE
Option #14: /D_WINDOWS
Option #15: /DNOPCH
Compiler directories: 11
Directory #1: ./../../lib/vc_x64_lib/mswu
Directory #2: ./../../include
Directory #3: .
Directory #4: ./../../samples
Directory #5: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/atlmfc/include
Directory #6: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/include
Directory #7: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/cppwinrt
Directory #8: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared
Directory #9: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt
Directory #10: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um
Directory #11: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt
Resource compiler directories: 11
Directory #1: ./../../lib/vc_x64_lib/mswu
Directory #2: ./../../include
Directory #3: .
Directory #4: ./../../samples
Directory #5: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/atlmfc/include
Directory #6: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/include
Directory #7: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/cppwinrt
Directory #8: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared
Directory #9: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt
Directory #10: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um
Directory #11: C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt
Linker options: 5
Option #1: /DEBUG
Option #2: /INCREMENTAL:NO
Option #3: /pdb:vc_mswu_x64\drawing.pdb
Option #4: /SUBSYSTEM:WINDOWS
Option #5: /MACHINE:X64
Linker directories: 5
Directory #1: ./../../lib/vc_x64_lib
Directory #2: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/atlmfc/lib/x64
Directory #3: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.15.26726/lib/x64
Directory #4: C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17134.0/ucrt/x64
Directory #5: C:/Program Files (x86)/Windows Kits/10/Lib/10.0.17134.0/um/x64
Linked libraries: 26
Library #1: wxmsw31u_adv
Library #2: wxmsw31u_core
Library #3: wxbase31u
Library #4: wxtiff
Library #5: wxjpeg
Library #6: wxpng
Library #7: wxzlib
Library #8: wxregexu
Library #9: wxexpat
Library #10: kernel32
Library #11: user32
Library #12: gdi32
Library #13: comdlg32
Library #14: winspool
Library #15: winmm
Library #16: shell32
Library #17: shlwapi
Library #18: comctl32
Library #19: ole32
Library #20: oleaut32
Library #21: uuid
Library #22: rpcrt4
Library #23: advapi32
Library #24: version
Library #25: wsock32
Library #26: wininet
Before-build commands: 0
Force before-build commands: no
After-build commands: 0
Force after-build commands: no
Virtual targets: 0
Units: 2
Unit #1: ../sample.rc, Weight: 0, Compile: yes, Link: yes, Targets: all
Unit #2: drawing.cpp, Weight: 0, Compile: yes, Link: yes, Targets: all
Before-build commands: 0
Force before-build commands: no
After-build commands: 0
Force after-build commands: no
Generating makefile(s): Make: Warning: toolchain 'vc_64-bit_compiler' for target 'Release x64' is not defined.
Warning: toolchain 'vc_64-bit_compiler' for target 'Release x64' is not defined.
[DONE]

Process returned 0 (0x0)   execution time : 1.187 s
Press any key to continue.

Anybody have an idea what I am missing, that caused the warnings and failure to create the makefile?  This is the first time that I am attempting to insert code in a post.

Regards,

Frank

« Last Edit: October 27, 2018, 01:19:17 am by Frank_CB »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Using cbp2make
« Reply #1 on: October 24, 2018, 10:49:20 pm »
I tried this tool in the past, and my problem (and i think you have the same) is that it uses own configurations for compiler. It does not read the configurations made in codeblocks. So if you define a new compiler (like you probably did) it does not recognize it... This is a big flaw in the tool. But i might be wrong...

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: Using cbp2make
« Reply #2 on: October 24, 2018, 11:57:17 pm »
@BlueHazzard
Thanks for sharing your experience with that tool.  I'm thinking about experimeting with loading and saving a configuration into the tool that mimics my compiler.  The documentation from sourceforge eludes to that possibility.

Regards, Frank

Offline Frank_CB

  • Almost regular
  • **
  • Posts: 148
Re: Using cbp2make
« Reply #3 on: October 27, 2018, 01:17:06 am »
Hello,

'cbp2make' is a tool included in CB.  It can be used to create additional configuration files, besides it's own included default.

Using a command prompt from CB's installation directory, the following commands:
'cbp2make --config --global'          ---> creates profile\.cbp2make\cbp2make.cfg
'cbp2make --config --local'            ---> creates profile\cbp2make.cfg

Outside of CB's IDE, the configuration files can be edited with a XML Copy Editor or a normal text editor.  Use the command 'cbp2make --help'  for help information. Redirect the output to a file if you wish.

'cbp2make' accesses the configuration files in the following order: global,local, default. The default configuration file is used if either of the others is missing.

In my own case, I edited the global configuration file. I stripped out all unnecessary platforms and toolchains, then added (by coping and renaming it) a toolchain for the 64-bit compiler. I haven't done it yet, but I suspect that a batch script could also modify the configuration file(s).

Inside CB, from cbp2make's tool commandline the following command:
--global -in $(project_dir)$(project_filename) -out makefile' ---> creates a makefile in the project's directory.

@BlueHazzard
Your response provided the inspiration for me to follow through on resolving this issue. Again, thank you!

Regards,

Frank
<edit>Removed whitespace.</edit>
« Last Edit: November 04, 2018, 03:13:25 pm by MortenMacFly »