I got an old app and I should just change the MySQL connection but I can't build it because it wrote on C++ Builder 6.
I've got the C++ Builder XE7 and installed missed libraries then linked those path in project options but the IDE write this error:
[ilink32 Error] Fatal: Unable to open file '.OBJ'
When I remove a path of library I don't get that error then I set back this path and remove another I get again that. I'm very confused.
The full log is:
Checking project dependencies...
Compiling guba2.cbproj (Debug, Win32)
ilink32 command line
c:\program files (x86)\embarcadero\studio\15.0\bin\ilink32.exe -G8 -LDebug_Build;"C:\Program Files (x86)\QuickReport\QR6-RAD-XE7\win32\release";
"C:\Program Files (x86)\Devart\MyDAC for RAD Studio XE7\Lib\Win32";"c:\program files (x86)\embarcadero\studio\15.0\lib\win32\release";
"C:\Users\Én\Downloads\Indy10C21\Win32\C21";"c:\program files (x86)\embarcadero\studio\15.0\lib\debug";cxmlfile;"c:\program files
(x86)\embarcadero\studio\15.0\Projects\Lib";xmlparser;"c:\Program Files\Borland\CBuilder6\Projects";"c:\program files
(x86)\embarcadero\studio\15.0\lib\obj";"c:\program files (x86)\embarcadero\studio\15.0\lib";"c:\Program Files\Borland\CBuilder6\MyDac\Lib";
"c:\program files (x86)\embarcadero\studio\15.0\lib\psdk";cxmlfile;"c:\program files (x86)\embarcadero\studio\15.0\Projects\Lib";xmlparser;
"c:\Program Files\Borland\CBuilder6\Projects";"c:\program files (x86)\embarcadero\studio\15.0\lib\obj";"c:\program files
(x86)\embarcadero\studio\15.0\lib";"c:\Program Files\Borland\CBuilder6\MyDac\Lib";"c:\program files (x86)\embarcadero\studio\15.0\lib\psdk";
"C:\Program Files (x86)\Devart\MyDAC for RAD Studio XE7\Lib\Win32";"c:\program files (x86)\embarcadero\studio\15.0\lib\win32\release";"c:\program
files (x86)\embarcadero\studio\15.0\lib\win32\release\psdk";"C:\Program Files (x86)\FastReports\LibD21";"C:\Program Files
(x86)\Raize\CS5\Lib\RS-XE7\Win32";"C:\Program Files (x86)\Devart\MyDAC for RAD Studio XE7\Lib\Win32";"C:\Program Files
(x86)\QuickReport\QR6-RAD-XE7\win32\release";"C:\Program Files (x86)\QuickReport\QR6-RAD-XE7\win32\debug";
C:\Users\Public\Documents\Embarcadero\Studio\15.0\DCP -jDebug_Build;"C:\Program Files (x86)\QuickReport\QR6-RAD-XE7\win32\release";"C:\Program Files
(x86)\Devart\MyDAC for RAD Studio XE7\Lib\Win32";"c:\program files (x86)\embarcadero\studio\15.0\lib\win32\release";
"C:\Users\Én\Downloads\Indy10C21\Win32\C21";"c:\program files (x86)\embarcadero\studio\15.0\lib\debug";cxmlfile;"c:\program files
(x86)\embarcadero\studio\15.0\Projects\Lib";xmlparser;"c:\Program Files\Borland\CBuilder6\Projects";"c:\program files
(x86)\embarcadero\studio\15.0\lib\obj";"c:\program files (x86)\embarcadero\studio\15.0\lib";"c:\Program Files\Borland\CBuilder6\MyDac\Lib";
"c:\program files (x86)\embarcadero\studio\15.0\lib\psdk";cxmlfile;"c:\program files (x86)\embarcadero\studio\15.0\Projects\Lib";xmlparser;
"c:\Program Files\Borland\CBuilder6\Projects";"c:\program files (x86)\embarcadero\studio\15.0\lib\obj";"c:\program files
(x86)\embarcadero\studio\15.0\lib";"c:\Program Files\Borland\CBuilder6\MyDac\Lib";"c:\program files (x86)\embarcadero\studio\15.0\lib\psdk";
"C:\Program Files (x86)\Devart\MyDAC for RAD Studio XE7\Lib\Win32";"c:\program files (x86)\embarcadero\studio\15.0\lib\win32\release";"c:\program
files (x86)\embarcadero\studio\15.0\lib\win32\release\psdk";"C:\Program Files (x86)\FastReports\LibD21";"C:\Program Files
(x86)\Raize\CS5\Lib\RS-XE7\Win32";"C:\Program Files (x86)\Devart\MyDAC for RAD Studio XE7\Lib\Win32";"C:\Program Files
(x86)\QuickReport\QR6-RAD-XE7\win32\release";"C:\Program Files (x86)\QuickReport\QR6-RAD-XE7\win32\debug";
C:\Users\Public\Documents\Embarcadero\Studio\15.0\DCP -l. -v -Gn
-GA"C:\Users\N7409~1\AppData\Local\Temp\vfs15D2.tmp"="C:\Users\Én\Documents\Embarcadero\Studio\Projects\makosguba kiszallitas 2\Unit1.dfm" -aa -V5.0
-Tpe c0w32 memmgr.lib sysinit.obj Debug_Build\guba2.obj Debug_Build\kaja_classes.obj Debug_Build\md5.obj Debug_Build\online_orders.obj
Debug_Build\order_classes.obj Debug_Build\Unit1.obj Debug_Build\user_classes.obj , .\guba2.exe , .\guba2.map , vcl.lib rtl.lib vclx.lib bdertl.lib
dbrtl.lib dac60.lib mydac60.lib vcldb.lib indycore.lib indysystem.lib bcbsmp.lib IndyProtocols.lib dac210.lib mydac210.lib vclimg.lib xmlrtl.lib
vclactnband.lib QRWRunDXE7w64.lib import32.lib cp32mt.lib , , guba2.res
[ilink32 Error] Fatal: Unable to open file '.OBJ'
Failed
Elapsed time: 00:00:11.8
Remove the instruction #pragma link "XXX.Obj".
Related
I'm attempting to take a DLL that is not strongly named and then strongly name it without needing to have the source code, since I will not always have the source code, only the DLL. When I try and run the batch file with the below code to accomplish this I get an error. Here is the code:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\ildasm.exe" .\targetFile.dll /out:.\Signed\targetFile.il
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe" .\Signed\targetFile.il /dll /key=.\targetFile.snk /output=.\Signed\targetFile.dll
The error I get is the following:
.\Signed\targetFile.il(43) : error -- Failed to extract public key: 0x80070005
I'm not sure what I'm missing, I have permissions to all involved folders including the MacnineKeys folder in ProgramData.
I have built a Console Application using Code::Blocks 20.03, which was installed using codeblocks-20.03mingw-setup.exe. The defaults for the installation directory(see Note01) and the installation type (Full), were used.
I tried to Debug by using the Debug menu, clicking Start/Continue, and debugging failed.
I guess the important information from the log of what happened is
Starting the debuggee failed: No executable specified, use `target exec'
The full output from trying to debug is given below.
My question is, how do you debug using Code::Blocks 20.03 (the "mingw" version)?
Full Output from trying to run a debugging session follows.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\
Adding source dir: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\
Adding file: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\bin\Debug\program01INc.exe
Changing directory to: C:/CodeBlocks20.03Small/ConsoleApplication/program01INc/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Users\Roger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\FreeFem++;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32;C:\Users\Roger\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\texlive\2017\bin\win32;C:\Users\Roger\AppData\Local\Microsoft\WindowsApps;\;C:\Program Files (x86)\clisp-2.49
Starting debuggee: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/CodeBlocks20.03Small/ConsoleApplication/program01INc/bin/Debug/program01INc.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0
===============================
In building my project I used the defaults from the Select Compiler dialog box.
Note01:
It looks as if you should (date 11th April 2021) always use the default directory, to install. I installed a version of Code::Blocks in C:\Program Files\CodeBlocksSmall when I went to uninstall it, the uninstaller would only accept C:\Program Files\CodeBlocks as the directory to uninstall from. I deleted the CodeBlocksSmall directory manually. I noticed this behaviour when I installed using codeblocks-20.03-setup.exe.
Related question
Starting the debuggee failed: No executable specified, use `target exec'
=======================
It looks as if a prior installation of MinGW was inadvertently being used by the attempted debugging session(this is no longer possible). See the involvement of the file
C:\MinGW\bin\gdb.exe, in the line
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args
Now when I try to run a debugging session, failure occurs differently (see just after the next four lines).
It looks to me as if I need to at least to change the behaviour indicated by
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args
to behaviour produced by
Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\
Adding source dir: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\
Adding file: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\bin\Debug\program01INcForAnswer.exe
Changing directory to: C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Users\Roger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\FreeFem++;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32;C:\Users\Roger\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\texlive\2017\bin\win32;C:\Users\Roger\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\clisp-2.49
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/bin/Debug/program01INcForAnswer.exe
failed
Another related question is at
code blocks failed message runing hello code
There, the error message is like the one shown just above, and see also below
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/bin/Debug/program01INcForAnswer.exe failed
Note that, in both cases, Code::Blocks is trying to invoke a debugger from the directory C:\MinGW\bin
To get debugging working, the type of fix described here wil be required if you install the MinGW version of Code::Blocks 20.03 on Windows, using codeblocks-20.03mingw-setup.exe ( the 8th April 2021 version, with the default installation accepted ).
What I did to get it to work was the following.
From the Settings menu I clicked on Debugger.., then on the left of the screen selected Default, a debugger type. This showed me Executable paths which was set to
C:\MinGW\bin\gdb.exe
I changed this to
C:\Program Files\Codeblocks\MinGW\bin\gdb.exe
I was then able to use the debugger.
When I go to the "Setup Property Pages" in a Visual Studio Setup project and view the Prerequisites, I see a warning:
Prerequisite could not be found for bootstrapping
I did the following things:
Added a new folder in: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages" with my package
Restarted VS2010
(Even rebooted my pc)
Warning is still visible on that package.
Next I've added a .VSBootstrapperManifest file in the Packages directory ( C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages )
Restarted VS2010 again but that didn't help either, same with reboot.
Any suggestion what could be wrong?
This worked on my Win7 x64 machine, but this doesn't seem to work anymore on my Win8 Pro x64.
Thanks in advance.
update:
When I open the Product.xml file from my package I see these XML lines:
<InstallChecks>
<RegistryCheck Property="FoxProOleDbInstalled" Key="HKCR\CLSID\{...-..-..}\InprocServer32" />
</InstallChecks>
When I search that key {...-..-..} in my registry I cannot find it at the location HKCR\CLSID{...-..-..}
But I can find it at this location:
HKEY_CLASSES_ROOT\ Wow6432Node \CLSID\ {...-..-..}
Can I just add another line inside the InstallChecks-tag in the Product.xml ?
How will the RegistryCheck tags be checked in that file (AND? OR?)
(I think all InstallChecks need to be true but I'm not sure, the documentation is not so clear: http://msdn.microsoft.com/en-us/library/ms229432(v=vs.80).aspx )
If you are developing windows 8 store/metro apps in "windows 8 pro".
Use visual studio 2012 instead of vs2010.It will work.
I try generate dbml from sdf file.
So I localize sqlMetal util in: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
Sdf DB file path: D:\DB_TEST\Spiri_SQL_CE_DB.sdf
So I try this command on generate dbml file:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>sqlmetal.exe D:\DB_TEST\
Spiri_SQL_CE_DB.sdf /dbml:D:\DB_TEST\Spiri_SQL_CE_DB.sdf\Spiri_SQL_CE_DB.dbml
I get this error:
Error : SQM1007: There is an IO error and the output file 'D:\DB_TEST\Spiri_SQL_
CE_DB.sdf\Spiri_SQL_CE_DB.dbml' cannot be opened.
So I try this command:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>sqlmetal.exe D:\DB_TEST\
Spiri_SQL_CE_DB.sdf /dbml:Spiri_SQL_CE_DB.dbml
But I get this error:
Error : Access to the path 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\
Bin\Spiri_SQL_CE_DB.dbml' is denied.
On the end I try this version of command:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>sqlMetal /dbml:Spiri_SQL
_CE_DB.dbml D:\DB_TEST\Spiri_SQL_CE_DB.sdf
But I get same error:
Error : Access to the path 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\
Bin\Spiri_SQL_CE_DB.dbml' is denied.
I know that file Spiri_SQL_CE_DB.dbml doesn’t exist yet, but I try generate with sqlMetal turil this file, what is bad?
Copy both the SDF and DBML to a location where you have sufficient write/modify rights.
Else start the command prompt with elevated permissions (aka runas administrator).
BTW your first attempt is completely bogus.
OR do:
sqlMetal /dbml:D:\DB_TEST\Spiri_SQL_CE_DB.dbml D:\DB_TEST\Spiri_SQL_CE_DB.sdf
Where is TextTransform.exe located?
I'm trying to implement the solution in this post:
Get Visual Studio to run a T4 Template on every build
However I'm getting an error
"'TextTransform.exe' is not recognized as an internal or external command,
operable program or batch file."
I have been looking through the program files, however not sure where TextTransform.exe is located.
It should be below
\Program Files\Common Files\Microsoft Shared\TextTemplating\
see: http://msdn.microsoft.com/en-us/library/bb126245.aspx
Anyone coming to this question that's using VS 2017 or later should be using vswhere to locate this file. #codingdave's comment is the closest but that still won't work on many computers.
I've added an example to the Microsoft Docs article feedback that shows how to do this with Powershell.
#the path to VSWhere.exe is always in programfiles(x86)
$progFilesx86Path = [System.Environment]::ExpandEnvironmentVariables("%programfiles(x86)%")
$vsWherePath = Join-Path $progFilesx86Path "\Microsoft Visual Studio\Installer\vswhere.exe"
# this tells vswhere to use paths of the latest version of visual studio installed
# to locate this exe anywhere in those paths, and return a single textual
# value (not a json object or xml payload)
$ttExe = & $vsWherePath -latest -find **\TextTransform.exe -format value
if (-Not(Test-Path $ttExe)){
throw "Could not locate TextTransform.exe"
}
#then to invoke a transformation
& "$ttExe" c:\Source\YourTransform.tt
From #codingdave's comment
For VS2017, VS2019 location of TextTransform.exe will be
C:\Program Files (x86)\Microsoft Visual Studio\<<Version>>\<<Edition>>\Common7\IDE
Version -> (2017/2019)
Edition -> (Community/Professional/Enterprise)
And in pre build event we can use macro like
"$(DevEnvDir)\TextTransform.exe" "$(ProjectDir)AssemblyInfo.tt"
I would recommend trying this over that solution: http://www.olegsych.com/2010/04/understanding-t4-msbuild-integration
If you don't have VS 2010, though, I suppose you're stuck doing it the hard way.