Page 1 of 1

[C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Sun Aug 16, 2020 12:30 pm
by DeveloperAcstre
Hi,

when compiling with TwineCompile 5.2 i often get this error "[C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1." when doing "Build". If i try to "Make" the project after the error it compiles fine. I am using bcc32c and bcc64 compilers, i haven't tested this on the classic bcc32.

Another problem that occurred to me a couple of time is a linker error "unresolved vtable for TForm2" when I do "Make". If I then do a clean and build it compiles just fine. I'm not sure if this is related to TwineCompile. (I have proper configuration of output directories so i don't have a clue why this is happening).

Best regards!

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Mon Aug 17, 2020 8:37 am
by jomitech
Can you provide the output from the Console Output tab in the compile window when you get that mtbcc32 error?

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Mon Aug 17, 2020 10:54 am
by DeveloperAcstre
Here is the console output:

Code: Select all

Preparing...
Building...
Build started 17.8.2020 г. 8:44:06.
__________________________________________________
Project "C:\Users\UserPC\Desktop\tc_crash_test\Package1.cbproj" (Build target(s)):

Target CleanLinkerStateFiles:
    Deleting file ".\Win32\Debug\Package1.ilc".
    Deleting file ".\Win32\Debug\Package1.ild".
    Deleting file ".\Win32\Debug\Package1.ilf".
    Deleting file ".\Win32\Debug\Package1.ils".
    Deleting file ".\Win32\Debug\Package1.pdi".
Target MakeObjs:
    Target TCInitFileList:
        Deleting file "C:\Users\UserPC\Desktop\tc_crash_test\twfiles.@@@".
Compiling C++ files...
    Target TCCompile:
        C:\Program Files (x86)\JomiTech\TwineCompile\mtbcc32.exe -ide104 -alias"C:\Users\UserPC\Desktop\tc_crash_test\Package1.cpp"="C:\Users\UserPC\AppData\Local\Temp\TwineCompile\Package1.cpp*1360085926"; -priority0 -clang -files="C:\Users\UserPC\Desktop\tc_crash_test\twfiles.@@@"  
        JomiTech TwineCompile 5.2 - Copyright JomiTech 2020. All Rights Reserved.
        Compiling 2 files...
        Embarcadero C++ 7.50 for Win32 Copyright (c) 1993-2020 Embarcadero Technologies, Inc.
        C:\Users\UserPC\Desktop\tc_crash_test\Package1.cpp
        Package1.cpp: (0) 0 of 0
        C:\Users\UserPC\Desktop\tc_crash_test\Package1.cpp
        Error: Borland option to build DLL was disabled in PCH file but is currently enabled
        Error: macro 'USEPACKAGES' was undef'd in the precompiled header but defined on the command line
        C:\Users\UserPC\Desktop\tc_crash_test\Unit2.cpp
        Unit2.cpp: (1) 0 of 0
        C:\Users\UserPC\Desktop\tc_crash_test\Unit2.cpp
        Error: Borland option to build DLL was disabled in PCH file but is currently enabled
        Error: macro 'USEPACKAGES' was undef'd in the precompiled header but defined on the command line
        Compiled 2 files in 0,14 secs.
        Errors during compile.
        C:\Program Files (x86)\JomiTech\TwineCompile\TCTargets104.targets(762,5): error MSB6006: "mtbcc32" exited with code 1.
    Done building target "TCCompile" in project "Package1.cbproj" -- FAILED.
Done building target "MakeObjs" in project "Package1.cbproj" -- FAILED.

Done building project "Package1.cbproj" -- FAILED.

Build FAILED.

C:\Program Files (x86)\JomiTech\TwineCompile\TCTargets104.targets(762,5): error MSB6006: "mtbcc32" exited with code 1.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.29
Finished Build.
I am attaching a sample project that demonstrates the issue. The first time when you do Build all it will compile, after that if u do it again it crashes.
tc_crash_test.zip
(36.69 KiB) Downloaded 687 times

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Tue Aug 18, 2020 7:21 pm
by jomitech
Thanks for the test project, it was very helpful in reproducing the issue. I have attached a fix to this post - please download and extract into the TwineCompile Program Files directory (replacing the existing TCTargets104.targets file)

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Fri Aug 21, 2020 3:38 pm
by DeveloperAcstre
Hi,

sorry for the late response, I just tested the update but it outputs the following error:
Untitled.png
(172.4 KiB) Not downloaded yet
Here is the output:

Code: Select all

Preparing...
Building...
Build started 21.8.2020 г. 23:34:36.
__________________________________________________
Project "C:\Users\ilia\Desktop\tc_crash_test\Package1.cbproj" (Build target(s)):

Target MakeObjs:
    Target TCBuildFileList:
        Target TCCheckPCHState:
            C:\Program Files (x86)\JomiTech\TwineCompile\TCTargets104.targets(420,3): error MSB4044: The "BccDependencyCheck" task was not given a value for the required parameter "OutputFile".
        Done building target "TCCheckPCHState" in project "Package1.cbproj" -- FAILED.
    Done building target "TCBuildFileList" in project "Package1.cbproj" -- FAILED.
Done building target "MakeObjs" in project "Package1.cbproj" -- FAILED.

Done building project "Package1.cbproj" -- FAILED.

Build FAILED.

C:\Program Files (x86)\JomiTech\TwineCompile\TCTargets104.targets(420,3): error MSB4044: The "BccDependencyCheck" task was not given a value for the required parameter "OutputFile".
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.00
Finished Build.
This is tested on the same demo project.

Best regards!

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Tue Aug 25, 2020 4:58 pm
by jomitech
My apologies, wrong file was attached. Please try this one.

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Thu Aug 27, 2020 2:51 pm
by DeveloperAcstre
This one works as expected, thank you!

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Fri Sep 25, 2020 4:31 am
by RobinP
Hi I'm getting a similar error using C++ Builder 10.3.3 with Twine 5.2.1.250 on an empty project, do you have any new releases to fix this?

In case it's not the same cause, the actual error in my case seems to be:

Error: unable to read PCH file .\Win32\Debug\Project20PCH1.pch: 'no such file or directory'
Fatal: PCH file '.\Win32\Debug\Project20PCH1.pch' not found: module file not found

Re: [C++ Error] TCTargets104.targets(658, 5): MSB6006 "mtbcc32" exited with code 1.

Posted: Mon Sep 28, 2020 8:31 pm
by jomitech
I've attached a similar fix for 10.3.3. Please extract into the TwineCompile Program Files directory - it should overwrite an existing file.