First of all, sorry for the length of this message and for my poor English.
I have a application programmed with Visual C++ 2010 and Windows XP application. If I run the application on the same computer where I have installed the Visual Studio, it works without problems but if I run it from another computer with Windows 7 I get an error.
And the information on the display of events is:
And if I run the application on a computer with Windows XP the error is:
And the event display is:
I have checked the versions that I have installed on three computers msvcr100.dll file. On the computer with windows xp and Visual Studio installed are:
On the computer with Windows XP without Visual Studio are:
And on the computer with Windows 7 are:
You can see that the three computers have the same version of the file (10.0.40219). I have checked the dependencies with "Dependecy Walker" program but has not found anything. Also I uninstalled and installed the Visual Studio 2010 x86 Redistributable but I still have the error.
Can I get help finding a solution?
Thank you very much.
UPDATE:
I have run the command sxstrace with the following result:
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = C:\KMQQ760\KMQQ.exe
AssemblyDirectory = C:\KMQQ760\
Application Config File =
INFO: Parsing Manifest File C:\KMQQ760\KMQQ.exe.
INFO: Manifest Definition Identity is kmqq.exe,processorArchitecture="x86",type="win32",version="5.1.0.0".
ERROR: Line 1: XML Syntax error.
ERROR: Activation Context generation failed.
End Activation Context Generation.
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = C:\Windows\system32\sppsvc.exe
AssemblyDirectory = C:\Windows\system32\
Application Config File =
INFO: Parsing Manifest File C:\Windows\system32\sppsvc.exe.
INFO: Manifest Definition Identity is System.Security.SoftwareLicensing.Server,processorArchitecture="x86",type="win32",version=" 1.0.0.0".
INFO: Activation Context generation succeeded.
End Activation Context Generation.
And the RT_MANIFEST resource of kmqq.exe is:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentity processorArchitecture="x86" version="5.1.0.0" type="win32" name="kmqq.exe"></assemblyIdentity><description>KitchenMaster</description><trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel></requestedPrivileges></security></trustInfo><application xmlns="urn:schemas-microsoft-com:asm.v3"><windowsSettings><ms_windowsSettings:dpiAware xmlns:ms_windowsSettings="http://schemas.microsoft.com/SMI/2005/WindowsSettings" xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</ms_windowsSettings:dpiAware></windowsSettings></application></assembly>
I do not find file version msvcr100.dll is conflicting. Can it be that the error is other?
Thanks in advance.
Related
I unpacked OMNeT++ 5.0 and in configure.user I have set:
prefer-clang=no
or
prefer -clang =yes
and execute ./configure and then make, the output gcc-release, gcc-debug.
My microsoft visual studio version is MS 2008. Do I must install VS in higher version for example 2010 or high or change OMNeT++ version? My simulation files don't give errors when I am executing build for my project, but when I arrive to my simulation sumo interface and choose one section from my simulation, it gives the following message that belongs xml files
:
<!> Error in module (Veins::TraCIScenarioManagerLaunchd) VANET.manager (id=6) during network setup: While evaluating parameter launchConfig': Error reading F:/omnetpp-5.0/UV-CAST-protocol/simulations/_maps/downtownorlando/downtownorlando50_1.launchd.xml': Parse error: failed to load external entity "F:/omnetpp-5.0/UV-CAST-protocol/simulations/_maps/downtownorlando/downtownorlando50_1.launchd.xml"
at line (null):0
My veins is veins 4.4, my sumo is sumo 0.25.
This line in omnet.ini file is
*.manager.launchConfig = xmldoc("F:/omnetpp-5.0/UV-CAST-protocol/simulations/_maps/downtownorlando/downtownorlando"+ string(${Traffic=50, 100, 150, 200, 250, 300})+ "_" + string(${repetition}) + ".launchd.xml")
Note.
I unpacked OMNeT++ 5.6.2 and modify configure.user:
prefer-clang=no
and execute ./configure and then make ...the output gcc-release, gcc-debug, but
prefer-clang=yes
...the output clang-release,clang-debug
My microsoft visual studio version is 2008. I can't execute the simulation in OMNeT++ 5.6.2 and veins 5.2 because I work in veins 4.4.
If you are using OMNeT++ for Windows, you do not need Microsoft Visual Studio at all. The package for Windows contains already all necessary tools including compilators.
Make sure that all files pointed in the parameter launchConfig exist.
Could you edit your question and present one of the files from the above mentioned parameter, for example F:/omnetpp-5.0/UV-CAST-protocol/simulations/_maps/downtownorlando/downtownorlando50_0.launchd.xml?
While running my unit test in VS2017 in debug mode, after the build the run starts but immediately after i get an exception before any of my breakpoints are hit:
Managed Debugging Assistant 'BindingFailure'
Message=Managed Debugging Assistant 'BindingFailure' :'*The assembly with display name 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.Extensions.MSAppContainerAdapter' or one of its dependencies. The system cannot find the file specified.*'
How can I figure it out where is this issue coming from?
The file in the exception message can be found under:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions and has the version 15.0.28307
The VS2017 that i use has the version 15.9.11
I currently want to create a installer for a VS2017 project. This project has as prerequisite vcredist_x64.
To create an installer I have installed:
- ClickOnce Publishing (via VS2017 installer)
- Microsoft Visual Studio 2017 Installer Projects (VS2017 Addon by Microsoft)
Now I created a setup project and in properties => prerequisite I selected Visual C++ "14" Runtime Libraries (x64) and Download prerequisites from the component vendor's web site.
If I now start created setup.exe I'm getting on my target machine an error during installing of prerequisites: The following packages could not be found: (there is not a single packages listed).
Log file:
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 10.0.0 {version}
Running checks for package 'Visual C++ "14" Runtime Libraries (x64)', phase BuildList
Running MsiProductCheck with ProductCode '{C99E2ADC-0347-336E-A603-F1992B09D582}'
MsiQueryProductState returned '-1'
Setting value '-1 {int}' for property 'VCRedistInstalled'
The following properties have been set for package 'Visual C++ "14" Runtime Libraries (x64)':
Property: [VCRedistInstalled] = -1 {int}
Running checks for command 'vc_redist.x64.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'VCRedistInstalled' and value '3': false
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'AMD64': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.00': false
Result of checks for command 'vc_redist.x64.exe' is 'Install'
'Visual C++ "14" Runtime Libraries (x64)' RunCheck result: Install Needed
Installation of components 'Visual C++ "14" Runtime Libraries (x64)' was accepted.
Copying files to temporary directory "C:\Users\blubb_user\AppData\Local\Temp\VSD1A14.tmp\"
Error: The following package files could not be found:
In VS 2015 I had same trouble. Fix there was to fix PublicKey in bootstrapp file. But I was not able to find correct PublicKey. I was trying using the PublicKey of signature of matching installer. In C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x64\product.xml GUID C99E2ADC-0347-336E-A603-F1992B09D582 is mentioned, so I looked for setup with this GUID in C:\ProgramData\Package Cache\ and took this PublicKey.
Any idea how to fix it for VS2017?
Update (Solution):
I was able to fix it for me (VS2017 Update 7):
In packages.xml (C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x64\en) path of VCRedistExe was invalid.
Instead of
<String Name="VCRedistExe">https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe</String>
I have now
<String Name="VCRedistExe">https://aka.ms/vs/15/release/26429.04/VC_Redist.x64.exe</String>
C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x64\product.xml I changed too
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Microsoft.Visual.C++.14.0.x64">
<!-- Defines list of files to be copied on build -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="vc_redist.x64.exe" HomeSite="VCRedistExe" PublicKey="3082010a0282010100a829fed410c8ff550a9e990003528fdcb0bff9abf851fe5c8c54c227ce4c2b96ebdb811ccb862b79ca757eb867832686bdd62f1c3ec758aa8f6f95fb5afca7c61bc1c3e84c174e223db75b565c7fd75af52dbabba609bf067cee98fe40f930b86bfe406f74b3b8d63849c9d087072f31dfb6bc4ea3d09eb7627b5670754f67bf05cca3aebe0092c21b50a1613b100001b186d029f340f50fd9a30f57ab6309a8dca96ae74743a7be15c43d27a4e8565288cf5999a10084369bd039d22a0d2fe604e2bf13968883a95137184189e2f9859d8e651a3d0364ccc5de50705df20b85a98fb145e877ff839d09bb72e0e6560895b92b83128931fce758721dbdf983230203010001" />
</PackageFiles>
<InstallChecks>
<MsiProductCheck Property="VCRedistInstalled" Product="{03EBF679-E886-38AD-8E70-28658449F7F9}"/>
</InstallChecks>
<!-- Defines how to invoke the setup for the Visual C++ 14.0 redist -->
<Commands Reboot="Defer">
<Command PackageFile="vc_redist.x64.exe" Arguments=' /q '>
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<BypassIf Property="VCRedistInstalled" Compare="ValueGreaterThanOrEqualTo" Value="3"/>
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on any platform other than x64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" String="InvalidOS"/>
<!-- Block install on Vista or below -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="6.00" String="InvalidPlatformWinNT"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>
I'm not sure about Product="{03EBF679-E886-38AD-8E70-28658449F7F9}", because Setup has GUID {80586c77-db42-44bb-bfc8-7aebbb220c00} (MsiProductCheck does not work with it), so I took GUID from Microsoft Visual C++ 2017 x64 Minimum Runtime - 14.14.26429. Another possibility is to use GUID from Microsoft Visual C++ 2017 x64 Additional Runtime - 14.14.26429 ({B12F584A-DE7A-3EE3-8EC4-8A64DBC0F2A7}). Minimum and Additional Runtime will be installed with script above, so it should doesn't matter which GUID we take.
I had this problem with the x86 redist and was eventually able to blame everything on the MS supplied vcredist_x86\product.xml file. You should be able to apply the same fix to the vcredist_x64\product.xml file.
The problem arises due to file name and public key mismatches with the actual redist file that you download from MS.
You must change the name in both the PackageFiles\PackageFile node and Commands\Command node of product.xml to vcredist_x64.exe, as well as renaming the redist package from MS to vcredist_x64.exe. Then, change the publickey attribute in the PackageFile node to match the public key of the EXE you got from MS. You can get this by looking at the EXE's SHA1 certificate with File Explorer (Properties -> Digital Signatures (SHA1) -> Details -> View Certificate -> Details -> Public Key)
Same problem. Microsoft had a typo in their bootstrapper file. In C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x86\product.xml
replace vcredist_x86.exe with vc_redist.x86.exe and reload Visual Studio.
For vs2015,vs2017,vs2019: I had to right-click select Properties on the VC_redist.x86.exe file, then select Digital Signatures tab, select sha256 (not sha1) as above, then Details button to get the Certificate properties window, then the Details tab on that. Then I had to scroll down to Public Key. From there I had to select and Ctrl+C copy the hexadecimal Public key text from the ASCII dump window below since the Copy to File button only creates .cer files. Then I had to edit the product.xml file in Notepad++ launched in Administrator mode or else you won't be able to save the updated file. After pasting the Public key text into the product.xml file, I had to select the lines of the key and replace all the spaces separating the hex digits with "". Then I replaced the PublicKey value and finally saved.
Does anyone else think it odd that in 2020 the vc_redist.*.exe file still has no versioning reflected in the name, that the download site doesn't indicate the version in the text, does not indicate the public key, and that therefore the only way to know it's been updated since you last downloaded it is to compare the file size with your last version?
Update 2020-11-04: After downloading the latest redist from https://support.microsoft.com/en-ca/help/2977003/the-latest-supported-visual-c-downloads and updating product.xml as above, when installing my application with the updated msi, I get an error indicating "The following package files could not be found: vc_runtimeMinimum_x64.msi". In comparing the vc_redist exe I downloaded today to the one I had been using, I noted it is smaller. Looks like I get to go back to an older version.
I would appreciate if i can get some help in solving this issue for which i have been looking for information for over 2 days through various forums. Crying or Very sad Crying or Very sad
I have installed Infosphere Datastage v8.5 on windows environment for testing and have run a couple of jobs, but when i run a job containing a transformer i get compilation error.
Job: Row generator -> Tfx -> Sequential File
Based on my search through various forums i find that Similar issue has been faced by others as well.But i am unable to find a concrete answer regarding the following:
1. A Compiler that i need to install and the related SDK that needs to be installed along with it
2. or A combined pack that has both compiler+SDK
The Installation Guide talks about Microsoft Visual Studio .NET 2008 Express Edition C++: but does not mention which is the associated SDK that needs to be installed ?
or is there a newer version of C++ compiler+SDK that will work on my environment
My Environment Details:
OS - Windows Server 2008 R2(Standard) SP1 - 64 bit
IIS - Infosphere Information Server v8.5 64bit Multilingual
--================
.Net framework
--================
Microsoft .Net framework 1.1
Microsoft .Net framework 4 Client Profile
Microsoft .Net framework 4 Extended
--=====
SDK
--=====
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
This SDK created 2 directories path , which are as follows:
C:\Program Files\Microsoft SDKs
C:\Program Files (x86)\Microsoft Visual Studio 9.0
Windows Environment Variables:
INCLUDE - C:\IBM\SQLLIB\INCLUDE;C:\IBM\SQLLIB\LIB;C:\Program Files\Microsoft SDKs\Windows\v7.0\Include
LIB - C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib;C:\IBM\SQLLIB\LIB
CLASSPATH - .;C:\IBM\SQLLIB\java\db2java.zip;C:\IBM\SQLLIB\java\db2jcc.jar;C:\IBM\SQLLIB\java\sqlj.zip;
C:\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\IBM\SQLLIB\bin;C:\IBM\SQLLIB\java\common.jar
Path - C:\IBM\InformationServer\Server\DSComponents\bin;C:\Program Files (x86)\MKS Toolkit\mksnt;C:\PROGRA~2\MKSTOO~1\bin64;C:\PROGRA~2\MKSTOO~1\bin;
C:\PROGRA~2\MKSTOO~1\bin\X11;C:\PROGRA~2\MKSTOO~1\mksnt;C:\IBM\InformationServer\ASBNode\apps\jre\bin\classic;C:\IBM\InformationServer\ASBNode\lib\cpp;
C:\IBM\InformationServer\ASBNode\apps\proxy\cpp\vc60\MT_dll\bin;%systemroot%\system32;%systemroot%;
%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;c:\program files (x86)\microsoft visual studio 9.0\vc\bin;
c:\program files (x86)\microsoft visual studio 9.0\common7\ide;c:\program files\ibm\gsk8\lib64;C:\IBM\SQLLIB\BIN;C:\IBM\SQLLIB\FUNCTION;
C:\IBM\SQLLIB\SAMPLES\REPL;C:\Windows/SysWOW64
Compiler information from windows command prompt:
c:\Users\skh>cl.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
Datastage Environment Variables:
APT_COMPILEOPT (old): -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c -W/Zc:wchar_t-
APT_COMPILEOPT (new): -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c
APT_LINKOPT(old): -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-
APT_LINKOPT(new): -s -W/dll -W/base:0x50000000
The (old) represent the default values that DS Environment variables had. I ran my job which had a transformer but i got the compilation error.
I changed the Environment variable values to what is stated in (new), still i get the compilation error mentioned below
Output from transformer compilation follows:
I IIS-DSEE-TFCN-00001 12:55:36(000)
IBM WebSphere DataStage Enterprise Edition 8.5.0.5746
Copyright (c) 2001, 2005-2008 IBM Corporation. All rights reserved
##I IIS-DSEE-TFCN-00006 12:55:36(001) <main_program> conductor uname: -s=Windows_NT; -r=1; -v=6; -n=IN-MUM-IBMQLT; -m=Pentium
##I IIS-DSEE-TOSH-00002 12:55:36(002) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 12:55:36(003) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 12:55:36(004) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 12:55:36(007) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##E IIS-DSEE-TBLD-00076 12:55:39(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 256.
##E IIS-DSEE-TFSR-00019 12:55:39(001) <main_program> Could not check all operators because of previous error(s)
##W IIS-DSEE-TFTM-00012 12:55:39(002) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##I IIS-DSEE-TBLD-00000 12:55:39(003) <main_program> Error when checking composite operator: Output from subprocess: cl : Command line warning D9035 : option 'GX' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'EHsc' instead of 'GX'
cl : Command line warning D9025 : overriding '/GX' with '/EHa'
##I IIS-DSEE-TBLD-00000 12:55:39(004) <main_program> Error when checking composite operator: Output from subprocess: C:\IBM\InformationServer\Server\PXEngine\include\apt_util/ints.h(83) : fatal error C1083: Cannot open include file: 'strstream': No such file or directory
##W IIS-DSEE-TFEV-00025 12:55:39(005) <transform> Error when checking composite operator: Converting string to number.
##W IIS-DSEE-TFEV-00023 12:55:39(006) <transform> Error when checking composite operator: Implicit conversion from source type "String" to result type "DFloat".
##W IIS-DSEE-TFEV-00025 12:55:39(007) <transform> Error when checking composite operator: Converting number to string.
##W IIS-DSEE-TFEV-00023 12:55:39(008) <transform> Error when checking composite operator: Implicit conversion from source type "DFloat" to result type "String".
##W IIS-DSEE-TBLD-00000 12:55:39(009) <main_program> Error when checking composite operator: Output from subprocess: ld: script execution error in file 'C:/PROGRA~2/MKSTOO~1/etc/nutccg/ld.ccg' on line 1119
>>> execv: could not run 'link32': The system cannot find the file specified.
##I IIS-DSEE-TBLD-00079 12:55:39(010) <transform> Error when checking composite operator: cxx -LC:/IBM/InformationServer/Server/Projects/PRJ_QSPOC/RT_BP2.O/ -LC:/IBM/InformationServer/Server/PXEngine/lib -LC:/IBM/InformationServer/Server/PXEngine/user_lib -s -W/dll -W/base:0x50000000 -lliborchnt -lliborchcorent -lliborchbuildopnt C:/IBM/InformationServer/Server/Projects/PRJ_QSPOC/RT_BP2.O/V0S3_TestJob_Tfx_Transformer.tmp.o -o C:/IBM/InformationServer/Server/Projects/PRJ_QSPOC/RT_BP2.O/V0S3_TestJob_Tfx_Transformer.dll.
##E IIS-DSEE-TCOS-00029 12:55:39(011) <main_program> Creation of a step finished with status = FAILED. (TestJob_Tfx.Transformer)
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S3_TestJob_Tfx_Transformer transform operator.
0003: //
0004:
0005: // define our input/output link names
0006: inputname 0 DSLink2;
0007: outputname 0 DSLink5;
0008:
0009: initialize {
0010: // define our control variables
0011: int8 RowRejected0;
0012: int8 NullSetVar0;
0013:
0014: }
0015:
0016: mainloop {
0017:
0018: // declare our intermediate variables for this section
0019: dfloat InterVar0_0;
0020:
0021: // initialise the rejected row variable
0022: RowRejected0 = 1;
0023:
0024: // evaluate columns (no constraints) for link: DSLink5
0025: InterVar0_0 = DSLink2.Dummy1;
0026: DSLink5.Dummy1 = (InterVar0_0 + 5);
0027: writerecord 0;
0028: RowRejected0 = 0;
0029: }
0030:
0031: finish {
0032: }
0033:
*** End of Internal Generated Transformer Code
This is how i went about fixing it. I hope this helps people facing similar problems and saves some time and effort.
so , here it goes :
I installed Visual Studio C++ 2008 Express Edition.
I then worked around vcvarsall.bat file .if you are wondering why , please check
(
http://msdn.microsoft.com/en-us/library/x4d2c09s(v=vs.80).aspx )
and
Errors while building/installing C module for Python 2.7
)
I executed the following from the cmd window, to set the 64 bit compiler:
vcvarsall.bat amd64
NOTE: my environment has a X64 AMD chipset windows server;I used echo %PROCESSOR_ARCHITECTURE% , from cmd window to determine this.
To cross check which compiler is set, execute the following and the output would indicate.
cl.exe
Next , set the following windows system variables:
INCLUDE - C:\IBM\SQLLIB\INCLUDE;C:\IBM\SQLLIB\LIB; C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
LIB - C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib ;C:\IBM\SQLLIB\LIB
Note:-
The folder path C:\Program Files\Microsoft SDKs\Windows\v6.0A is created by the Visual Studio C++ 2008 Express Edition. This should be the source for folder paths that are set for INCLUDE & LIB
There is a similar path that the SDK creates C:\Program Files\Microsoft SDKs\Windows\v7.0\ , but Include and Lib folder from this path should not be used to set the above mentioned Windows Environment variables , I made this mistake during my set up :(
for reference please check the Release Note of the SDK that is to be installed.
Set the following Datastage ENV variable,from the Administrator, to values below.
APT_COMPILEOPT : -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c -W/Zc:wchar_t-
APT_LINKOPT : -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t-
I then restarted the Datastage services.
.. and the transformers started to work :)
PS : I did not uninstall Information Server nor the SDK (which i initially presumed was the problem)
I'm attempting to get a development environment up and running for developing applications with Oracle C++ Call Interface (OCCI) in Visual Studio 2005.
My system specs are:
OS: Windows 7, 64-bit
Oracle: 11g release 11.2.0.2, 32-bit
Instant Client: BasicLite and SDK version 11.2.0.4 32-bit
Visual Studio 2005 Professional Edition version 8.0 with 32-bit tools enabled
I've followed this guide by Mark Williams and I got the example running but only in release mode. When I switch to debug mode the app will build, but when I run it I get the following error:
Problem signature:
Problem Event Name: APPCRASH
Application Name: OCCITest.exe
Application Version: 0.0.0.0
Application Timestamp: 53f5dfdd
Fault Module Name: KERNELBASE.dll
Fault Module Version: 6.1.7601.18229
The small example program that triggers this error is:
#include "employees.h"
using namespace std;
using namespace oracle::occi;
int main (void)
{
Employees *pEmployees = new Employees();
delete pEmployees;
return 0;
}
Employees::Employees()
{
user = "hr";
passwd = "hr";
db = "localhost:1521/service_name";
env = Environment::createEnvironment(Environment::DEFAULT);
try
{
con = env->createConnection(user, passwd, db);
}
catch (SQLException& ex)
{
cout << ex.getMessage();
exit(EXIT_FAILURE);
}
}
Employees::~Employees()
{
env->terminateConnection (con);
Environment::terminateEnvironment (env);
}
If I remove all calls to OCCI functionality the application doesn’t crash. That is, this program runs error-free:
#include "employees.h"
using namespace std;
using namespace oracle::occi;
int main (void)
{
Employees *pEmployees = new Employees();
delete pEmployees;
return 0;
}
Employees::Employees()
{
user = "hr";
passwd = "hr";
db = "localhost:1521/service_name";
cout<<"Look at me, I'm running"<<endl;
}
Employees::~Employees()
{}
In the guide Mark mentions that when running in debug mode, the linker should use the library file oraocci11d.lib. However, this file is not included in the Instant Client SDK version 11.2.0.4, so I’m using the input file oraocci11.lib for both the release and debug version.
I'm running out of ideas about how to proceed in solving this problem, and I would greatly appreciate any and all help.
If the Oracle DLL receives and/or passes objects such as std::string or any other object that either:
Manipulates the heap in any way, or
The objects could have differing internals between app and DLL,
then you have no choice but to use the correct library to link with. Otherwise you wind up with binary or heap incompatible objects being passed, which leads to what you're seeing now.
See here: http://docs.oracle.com/cd/E11882_01/appdev.112/e10764/install.htm#CBHGBBJI
The link above mentions both the debug import library and debug version of the DLL. Also this is stated at the link:
Applications that link to MSVCRTD.DLL, a debug version of Microsoft C-Runtime, /MDd compiler flag, should link with these specific OCCI libraries: oraocci11d.lib and oraocci11d.dll.
Since it took me quite some time to get the debug environment working I figured I'd answer my own question now that I did.
I got a variety of errors throughout the ordeal, but the error that I got most stuck on was an error saying:
'The application was unable to start correctly (0xc0150002).
Click OK to close the application.'
Also, I used http://www.dependencywalker.com which repeatedly told me that either oraocci11d.dll or a the following list of dll's could not be found.
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
IESHIMS.DLL
However, what was really missing was for the executable to be able to find oci.dll. I'm just mentioning the errors in case someone else runs into these.
Here is what was needed to make it work:
First of all, the Instant Client does not contain the oraocci11d.lib or oraocci11d.dll, so it is necessary to install the full Oracle Client.
Next, the following must be added to the PATH:
C:\Program Files\Oracle\11.2.0\OCI\lib\MSVC\vc8
C:\Program Files\Oracle\11.2.0\BIN
In Visual Studio, select Tools -> Options, unfold 'Projects and Solutions' and select VC++ Directories. In 'Show directories for' under:
Include Files add C:\Program Files\Oracle\11.2.0\OCI\include
Library files add C:\Program Files\Oracle\11.2.0\OCI\lib\MSVC\vc8
In the property page for your project under Configuration Properties -> Linker select Input and under Additional Dependencies add oraocci11d.lib (or oraocci11.lib for release mode). Then select debug/release mode in the Configuration Manager
I have a related problem in that I am successfully using oraocci12d.dll/msvcr100d.dll, but this in turn is using oci.dll/msvcr100.dll. ie, oci.dll is not using the debug version of msvcr100.
My program seems to run okay, but any memory leak reporting disappears on exit.