Basic Programming Error in T24 Design Studio - jbase

Below is my code.
SUBROUTINE HELLO
*-----------------------------------------------------------------------------
*
*-----------------------------------------------------------------------------
* Modification History :
*-----------------------------------------------------------------------------
$INSERT I_COMMON
$INSERT I_EQUATE
*-----------------------------------------------------------------------------
CRT "HELLOW WORLD"
END
I'm trying to compile above code in T24 Design Studio using TAFJ but it generates below error.
17/01/2019 10:50:47 Compiling HELLO... ERROR
Error : (line 19) HELLO, Cannot find Insert 'I_EQUATE'
Error : (line 12) HELLO.b, No component defined. $PACKAGE is mandatory !
Compilation completed for 1 file(s). 2 errors
Need to know how to resolve this issue.

The first error "Cannot find Insert 'I_EQUATE'" means the compiler cannot find the insert file which is usually located inside t24lib. You have to right click on your project and select "Toggle TAFJ project nature", then provide location to t24lib folder with the T24 core libraries (temn.tafj.directory.precompile parameter in TAFJ conf properties).
Second error means that you should follow the TAFJ componentisation framework and you should have a .component and $PACKAGE keyword in routine indicating the package name. You can override this check by putting a "Dunce cup" on the folder where you have the routine.

Related

Build InstallShield project outside of Visual Studio

I have created a solution using Visual Studio 2017 which consists of a Windows Service C# Project and an InstallShield 2016 Basic MSI Project.
The InstallShield project has a single component added. This component has a number of files added using the Component->Files->Add File... (below)
Note the use of VSSolutionFolder.
Now when I open the InstallShield project (.ism) using InstallShield 2016, and build the project, I get the following build errors:
Loading File table
ISDEV : error -6103: Could not find file "<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe"
ISDEV : error -6103: Could not find file "<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe.config"
ISDEV : error -6103: Could not find file "<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.pdb"
ISDEV : error -6103: Could not find file "<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\App.config"
Building MsiFileHash table
ISDEV : error -6271: File <VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe not found. An error occurred building the MsiFileHash table record for this file. Verify that the file exists in the specified location.
ISDEV : error -6271: File <VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe.config not found. An error occurred building the MsiFileHash table record for this file. Verify that the file exists in the specified location.
ISDEV : error -6271: File <VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.pdb not found. An error occurred building the MsiFileHash table record for this file. Verify that the file exists in the specified location.
ISDEV : error -6271: File <VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\App.config not found. An error occurred building the MsiFileHash table record for this file. Verify that the file exists in the specified location.
Adding instance transforms to substorage...
ISDEV : error -1007: Cannot copy source '<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe' to target 'E:\Installshield\WebDeploy\Windows Services\ACMECorp.App.Service\ACMECorpSetup\ACMECorpSetup\Default Configuration\Release\DiskImages\DISK1\program files\ACME Corp\ACME Corp Service 0\ACMECorp.App.Service.exe'
ISDEV : error -1007: Cannot copy source '<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe.config' to target 'E:\Installshield\WebDeploy\Windows Services\ACMECorp.App.Service\ACMECorpSetup\ACMECorpSetup\Default Configuration\Release\DiskImages\DISK1\program files\ACME Corp\ACME Corp Service 0\ACMECorp.App.Service.exe.config'
ISDEV : error -1007: Cannot copy source '<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.pdb' to target 'E:\Installshield\WebDeploy\Windows Services\ACMECorp.App.Service\ACMECorpSetup\ACMECorpSetup\Default Configuration\Release\DiskImages\DISK1\program files\ACME Corp\ACME Corp Service 0\ACMECorp.App.Service.pdb'
ISDEV : error -1007: Cannot copy source '<VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\App.config' to target 'E:\Installshield\WebDeploy\Windows Services\ACMECorp.App.Service\ACMECorpSetup\ACMECorpSetup\Default Configuration\Release\DiskImages\DISK1\program files\ACME Corp\ACME Corp Service 0\App.config'
In Media Path Variables, there is a VSSolutionFolder with a value UNDEFINED.
I cannot change this Current Value - the UI does not allow it. Defined Value cannot be changed and Test Value doesn't seem to do much.
I have the project saved as xml but I only see the VSSolutionFolder referenced in file paths like so:
<row>
<td>acmecorp.app.service.exe</td>
<td>ACMECorpServiceFilesComponent</td>
<td>ACMECO~1.EXE|ACMECorp.App.Service.exe</td>
<td>0</td>
<td/>
<td/>
<td/>
<td>1</td>
<td><VSSolutionFolder>\ACMECorp.App.Service\bin\Debug\ACMECorp.App.Service.exe</td>
<td>1</td>
<td/>
</row>
Is there a way of setting VSSolutionFolder in InstallShield? Or is there some way of fixing this.
Ideally I want it to just load in Visual Studio and InstallShield without having to muck about with source locations - yes I can remove the files and re-add, but that is not the question (if I had a larger solution it wouldn't be acceptable I don't think).
Personally I recommend keeping your application code and your installer code in two different solutions. There are several reasons including:
1) A new version of VS comes out that IS doesn't support yet and you don't want to be held back.
2) Simplifies project dependencies and build order relationships. Build your app code first then build your installer code second.
3) Depending on where you are in the agile/devops spectrum you might want to keep your peanut butter and chocolate separate.
In this scenario I use postbuild xcopy commands and msbuild publish profiles to stage my application code to a "Deploy" directory in the workspace in the directory that your .ISPROJ and .ISM lives. From there InstallShield simply uses the standard ISPROJECTDIR path variable reference. Now you don't have to deal with the complexities of project output references. You have a nice model defined of what your deployed application should look like.
Try overriding the path variable. You can do this either with external approaches like iscmdbld -L... or with the Release Configuration property Path Variable Overrides. (Note that building the solution with MSBuild should already just work.)
If there are problems overriding VSSolutionFolder itself, you can change your file links to use a new standard variable that is defined to use <VSSolutionFolder> as its default path, but will definitely allow you to override it.

F# Microsoft.ParallelArrays not defined

So I downloaded and installed Microsoft Accelerator v2 to use ParallelArrays. I have referenced it in my project but when I try and execute the code from the module in a script file I get:
"The namespace 'ParallelArrays' is not defined
I have followed the instructions on this post:
Microsoft Accelerator library with Visual Studio F#
I've added a reference to the managed version "Microsoft.Accelerator.dll" to my F# project and then added the native "Accelerator.dll" as an item in my solution and set it's 'Copy To Output Directory' to Copy Always.
Still getting the FSI error and inline error in my script file on the '#load ...' line, however the solution builds fine, and no error in the module file.
Any ideas on what I'm missing? I'm sure it's something stupid.
Thanks,
Justin
UPDATE
I tried mydogisbox's advice, which got rid of the error above, but now when I run the code in the .fsx file I get this error instead:
--> Referenced 'F:\Work\GitHub\qf-sharp\qf-sharp\bin\Debug\Microsoft.Accelerator.dll' (file may be locked by F# Interactive process)
[Loading F:\Work\GitHub\qf-sharp\qf-sharp\MonteCarloGPU.fs]
error FS0192: internal error: F:\Work\GitHub\qf-sharp\qf-sharp\Accelerator.dll: bad cli header, rva 0
UPDATE 2
So the bad header error has dissapeared, but now I get this instead:
Microsoft.ParallelArrays.AcceleratorException: Failure to create a DirectX 9 device.
at Microsoft.ParallelArrays.ParallelArrays.ThrowNativeAcceleratorException()
at Microsoft.ParallelArrays.DX9Target..ctor()
at <StartupCode$FSI_0002>.$FSI_0002_MonteCarloGPU.main#() in F:\Work\GitHub\qf- sharp\qf-sharp\MonteCarloGPU.fs:line 14
Stopped due to error
I found this thread on MSDN however the answers proposed as fixes on that thread barely even relate to the question.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/98600646-0345-4f62-a6c5-f03ac9c77179/ms-accelerator?forum=csharpgeneral
My Direct X version is 11, and I imagine that will suffice, however I tried installing DX9 however, it tells me that a newer version is detected therefore cant install.
There are special directives for referencing dlls from fsi. The #load directive loads the .fs file only. You need to use the #r directive to reference the file. You can either use the full path of the file or you can use #I to include the path to the file. More details here. Keep in mind that fsi is completely independent of your project, so all references in your project must be duplicated in fsi for it to access the same types.

compile option for rcpp and lib files in windows

Hi I am trying to work with the rcpp. For this I want some cpp code which loads a dll by use of a lib-file (which has the same name as ). the code which I let run is:
cppFunction(includes=c("#include "windef.h","#include \"C:/data/Rdata/IHUAPI.H\" "), 'int functietom(int a){long serverhandle;int lRet;lRet = ihuConnect ( "historian1",NULL,NULL, &serverhandle ); return 5;}', verbose
= TRUE)
I get the following error:
undefined reference to `ihuConnect#16' collect2: ld returned 1 exit
status Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object
'C:/Users/user1663/AppData/Local/Temp/RtmpSW1Ki7/sourcecpp_1a04df63309/sourceCpp_26588.dll':
LoadLibrary failure:
the ihuConnect function is located in the ihuapi.lib and ihuape.dll files. In c++ in visual studio I add the lib file as added dependency and then I get rid of this error because I also sometimes get this error and then it was that I forgot to add the lib file in the compilation.
Thus My question is: how can I add this lib file as option in the compilation.
when I use dyn.load
("C:/data/Rdata/ihUAPI.dll")
and then check if it is loaded then he says yes
the problem is that getDLLRegisteredRoutines('ihUAPI', addNames = TRUE)
then it says:
data frame with 0 columns and 0 rows
so the dll seems not to contain the functions but it does when I use it from visual studio.
So please some help with lib-files and ddl-files
Tom Wambecq
You missed the Rcpp FAQ entry 2.9 'Can I use Rcpp with Visual Studio ?'.
And to kill all the suspense: No, you cannot.

uic: Unexpected element name

I am trying to compile a .pro file using qmake and Qt4 to get a library from qttestrunnerlib.pro but I get this error:
~/docs/UT_Cpp_Test/main/cppDir/src/qttestrunner$ qmake qttestrunnerlib.pro
uic: Error in line 6, column 14 : Unexpected element name
uic: Error in line 6, column 14 : Unexpected element name
When I use Qt3 it works, and I get my lib successfully. But I want to upgrade it to Qt4. Is it possible? and what should I do?
I've used uic3 from the qt3-support package (on gentoo at least)
uic3 -convert ui-file-qt3.ui -o ui-file-qt4.ui
That is because the designer in qt4 is different from qt3. means ui files generated by qt3 and qt4 are not the same. That's why the unexpected element name error!
The uic reads a user interface definition (.ui) file in XML as generated by Qt
Designer and creates corresponding C++ header or source files.
Easiest way to solve is, use your qt4 ide to open you form and it will ask for
conversion.Then use the newly created ui for your compilation.

"Source" parameter of the "MIDL" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem"

I am trying to migrate one of projects earlier in VS2008 to VS2010. On building I get the following error
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(317,7): error MSB4094: "hdxBinding.idl;hdxBlinking.idl;HDXCommandObject.idl;hdxds.idl;HSCProcessStatus.idl;HSCSelectableWindow.idl" is an invalid value for the "Source" parameter of the "MIDL" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".
On clicking this error, it takes me to the line Source ="#(Midl)" inside C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets file
A Code Snippet in Microsoft.CppCommon.targets file:
<ItemGroup>
<Midl Condition="'#(Midl)' != ''">
<MinimalRebuildFromTracking Condition="'$(BuildType)' != 'Build' or '$(ForceRebuild)' == 'true'">false</MinimalRebuildFromTracking>
</Midl>
</ItemGroup>
<PropertyGroup>
<MidlToolArchitecture Condition="'$(MidlToolArchitecture)' == ''">$(DefaultToolArchitecture)</MidlToolArchitecture>
</PropertyGroup>
<MIDL
Condition ="'%(Midl.ExcludedFromBuild)'!='true'"
Source ="#(Midl)"
AdditionalIncludeDirectories ="%(Midl.AdditionalIncludeDirectories)"
AdditionalOptions ="%(Midl.AdditionalOptions)"
ApplicationConfigurationMode ="%(Midl.ApplicationConfigurationMode)"
ClientStubFile ="%(Midl.ClientStubFile)"
CPreprocessOptions ="%(Midl.CPreprocessOptions)"
DefaultCharType ="%(Midl.DefaultCharType)"
DllDataFileName ="%(Midl.DllDataFileName)"
EnableErrorChecks ="%(Midl.EnableErrorChecks)"
ErrorCheckAllocations ="%(Midl.ErrorCheckAllocations)"
ErrorCheckBounds ="%(Midl.ErrorCheckBounds)"
ErrorCheckEnumRange ="%(Midl.ErrorCheckEnumRange)"
ErrorCheckRefPointers ="%(Midl.ErrorCheckRefPointers)"
ErrorCheckStubData ="%(Midl.ErrorCheckStubData)"
ExcludedInputPaths ="$(ExcludePath)"
GenerateClientFiles ="%(Midl.GenerateClientFiles)"
GenerateServerFiles ="%(Midl.GenerateServerFiles)"
GenerateStublessProxies ="%(Midl.GenerateStublessProxies)"
GenerateTypeLibrary ="%(Midl.GenerateTypeLibrary)"
HeaderFileName ="%(Midl.HeaderFileName)"
IgnoreStandardIncludePath ="%(Midl.IgnoreStandardIncludePath)"
InterfaceIdentifierFileName ="%(Midl.InterfaceIdentifierFileName)"
LocaleID ="%(Midl.LocaleID)"
MkTypLibCompatible ="%(Midl.MkTypLibCompatible)"
OutputDirectory ="%(Midl.OutputDirectory)"
PreprocessorDefinitions ="%(Midl.PreprocessorDefinitions)"
ProxyFileName ="%(Midl.ProxyFileName)"
RedirectOutputAndErrors ="%(Midl.RedirectOutputAndErrors)"
ServerStubFile ="%(Midl.ServerStubFile)"
StructMemberAlignment ="%(Midl.StructMemberAlignment)"
SuppressCompilerWarnings ="%(Midl.SuppressCompilerWarnings)"
SuppressStartupBanner ="%(Midl.SuppressStartupBanner)"
TargetEnvironment ="%(Midl.TargetEnvironment)"
TypeLibFormat ="%(Midl.TypeLibFormat)"
TypeLibraryName ="%(Midl.TypeLibraryName)"
UndefinePreprocessorDefinitions ="%(Midl.UndefinePreprocessorDefinitions)"
ValidateAllParameters ="%(Midl.ValidateAllParameters)"
WarnAsError ="%(Midl.WarnAsError)"
WarningLevel ="%(Midl.WarningLevel)"
TrackerLogDirectory ="%(Midl.TrackerLogDirectory)"
MinimalRebuildFromTracking ="%(Midl.MinimalRebuildFromTracking)"
ToolArchitecture ="$(MidlToolArchitecture)"
TrackerFrameworkPath ="$(MidlTrackerFrameworkPath)"
TrackerSdkPath ="$(MidlTrackerSdkPath)"
TLogReadFiles ="#(MIDLTLogReadFiles)"
TLogWriteFiles ="#(MIDLTLogWriteFiles)"
ToolExe ="$(MIDLToolExe)"
ToolPath ="$(MIDLToolPath)"
TrackFileAccess ="$(TrackFileAccess)"
AcceptableNonZeroExitCodes ="%(Midl.AcceptableNonZeroExitCodes)"
YieldDuringToolExecution ="$(MidlYieldDuringToolExecution)"
>
</MIDL>
Can somebody please tell me whats going wrong here. This is driving me crazy!!!!!!
Got a similar error today on a project that I am converting to VS2010. I don't have a good solution to the problem yet, but I have a workaround. In my case, the project contained 2 idl files. Call them A.idl and B.idl. A.idl is the main idl for the project. It includes B.Idl. The error I received was:
error MSB4094: "A.idl;B.idl" is an invalid value for the "Source" parameter of the "MIDL" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".
It seems that the build system searched for all idl files in the project and made a single call to the MIDL compiler with all of them even though that was bound to fail. I don't know why VS2010 does that and earlier version didn't (or maybe earlier versions of MIDL could handle multiple inputs).
The workaround: grab the MIDL arguments off of MIDL Command Line page of the project's properties. Then run MIDL by hand in a VS2010 Command Prompt window using those args. In my case, since A.idl includes B.idl, I only needed to run one MIDL command:
MIDL options-copied-from-project-properties A.IDL
It looks like you have multiple idl files in your project (hdxBinding.idl, hdxBlinking.idl, etc.). So the same trick might work for you.
Good luck
I ran into this issue trying to build the DataMonitor example from the TMG SDK with Visual Studio 2010. The problem from what I can tell is the MIDL > Output settings in the project - the Header File, IID File, Proxy File, and Type Library were set to "DataMonitor...", which was forcing those settings to be applied to all included IDL files (and not just the project's generated one).
Changing those settings to use %(Filename) instead and the project built fine.
When there are multiple IDL files in the project I converted from VS 2008 to VS 2010, I got this error. Since one IDL I had was included in the other. I disabled building of the included IDL file and it resolved this error.
These errors prop up when migrating to VS2010 as the .idl file properties are not migrated by VS2010 migrator. I got a similar error and resolved this by manually adding these parameters from to VS2010. Once done you will be able to get rid of these build errors.
I run into the same problem as well. The fix was (very confusing) remove empty in the vcxproj file. I run out of time and have not got to the bottom of why it helps - defining not empty HeaderFileName fixes the problem as well, other empty elements do not cause this problem (e.g. DllDataFileName).
If you want to reproduce bug or process of my investigation just create hello world and add two idl files. It should work. However if you add ItemGroupDefinition with Midl.HeaderFileName it should start failing. One wild guess is that it has something to do with batching of tasks (working example calls MIDL task for each file separately).

Resources