on 07-18-2012 11:03 PM
I am attempting to build my application that uses the Crystal Reports API, and the command line build is barfing on a missing DLL:
cl -I. -I.././IDL -I.././Infrastructure -Ic:\dev\iona\include -Ic:\dev\SourcePro -nologo -W3 -GR -vmg -Od -MD -Zi -Zm200 -DWIN32 -DWIN32_LEAN_AND_MEAN
-DVERSANT_ANSI -D_CRT_SECURE_NO_DEPRECATE -D_AFXDLL /clr /AI c:\dev\BusinessObjects\Common\4.0\managed -DNDEBUG -DIT_USE_STD_IOSTREAM -DORBIX_DLL -D_RWCONFIG=12d -D_CONSOLE -c main.cpp
main.cpp
c:\dev\sources\videoview_6_8-merge\video\nextlink\reportfaxservice\NReportFaxServiceImpl.h(15) : fatal error C1107: could not find assembly 'CrystalDecisions.CrystalReports.Engine.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
NMAKE : fatal error U1077: 'c:\dev\VisualStudio\VC\bin\cl.EXE' : return code '0x
2'
Stop.
I have a machine that appears to have that DLL in the location specified by the /AI directive, but on this machine (and several other new machines we have build and installed Visual Studio and Crystal Reports on), the DLL is not in that location.
Is there a different DLL that I should be using instead of that one? When I rip out references to that assembly (by removing the #using directives that reference those modules), then I get these errors:
cl -I. -I.././IDL -I.././Infrastructure -Ic:\dev\iona\include -Ic:\dev\SourcePro -nologo -W3 -GR -vmg -Od -MD -Zi -Zm200 -DWIN32 -DWIN32_LEAN_AND_MEAN -DVERSANT_ANSI -D_CRT_SECURE_NO_DEPRECATE -D_AFXDLL /clr /AI c:\dev\BusinessObjects\Common\4.0\managed -DNDEBUG -DIT_USE_STD_IOSTREAM -DORBIX_DLL -D_RWCONFIG=12d -D_CONSOLE -c main.cpp
main.cpp
c:\dev\sources\videoview_6_8-merge\video\nextlink\reportfaxservice\NReportFaxServiceImpl.h(133) : error C2061: syntax error : identifier 'ReportDocument'
c:\dev\sources\videoview_6_8-merge\video\nextlink\reportfaxservice\NReportFaxServiceImpl.h(136) : error C2061: syntax error : identifier 'ReportDocument'
NMAKE : fatal error U1077: 'c:\dev\VisualStudio\VC\bin\cl.EXE' : return code '0x
2'
Which occurs on these declarations:
void createPDF(
ReportDocument^ rpt,
String^ destinationString);
void printReport(
ReportDocument^ rpt,
String^ destinationString);
Where is ReportDocument, if it's not in CrystalDecisions.CrystalReports.Engine.dll. These are the relevant lines that I commented out:
// #using <CrystalDecisions.CrystalReports.Engine.dll>
// #using <CrystalDecisions.Shared.dll>
// using namespace CrystalDecisions::Shared;
// using namespace CrystalDecisions::CrystalReports::Engine;
Thanks.
What version of CR?
What version of .NET?
Commenting out the engine will not work. You're pretty well removing the core part of the CR APIs when you do that.
Does the app compile? Does it run? If it does, the engine assembly is being found. What happens if as a test you simply build off of the menu?
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry about that. I'm running Crystal Reports 2008 SP5 with Visual Studio 2005 SP1 with Microsoft .NET Framework Version 3.5 SP1.
The application doesn't compile, as indicated in my first post.
Can you comment on what assembly should contain ReportDocument? That's really the information I need. Thanks.
As you can see from the command line I included, we're referencing our Crystal Reports assemblies from this location:
/AI c:\dev\BusinessObjects\Common\4.0\managed
Here's a directory listing of that directory:
C:\dev\sources\VideoView_6_9\video\nextlink>dir c:\dev\BusinessObjects\Common\4.
0\managed
Volume in drive C has no label.
Volume Serial Number is F8B0-9C11
Directory of c:\dev\BusinessObjects\Common\4.0\managed
03/09/2012 11:35 AM <DIR> .
03/09/2012 11:35 AM <DIR> ..
11/29/2011 10:23 PM 24,576 BOEVsPackage.dll
11/29/2011 10:22 PM 36,864 BusinessObjects.Enterprise.Admin.DocProcessingServer.dll
11/29/2011 10:22 PM 9,728 BusinessObjects.Enterprise.Admin.FullClientServer.dll
11/29/2011 10:22 PM 15,872 BusinessObjects.Enterprise.Admin.WebiServerAdmin.dll
11/29/2011 10:23 PM 180,224 BusinessObjects.Enterprise.Biar.dll
11/29/2011 10:21 PM 40,960 BusinessObjects.Enterprise.Desktop.Agnostic.dll
11/29/2011 10:20 PM 11,776 BusinessObjects.Enterprise.Desktop.AppFoundation.dll
11/29/2011 10:20 PM 11,776 BusinessObjects.Enterprise.Desktop.Category.dll
11/29/2011 10:21 PM 32,768 BusinessObjects.Enterprise.Desktop.ClientAction.dll
11/29/2011 10:21 PM 28,672 BusinessObjects.Enterprise.Desktop.ClientActionSet.dll
11/29/2011 10:21 PM 28,672 BusinessObjects.Enterprise.Desktop.ClientActionUsage.dll
11/29/2011 10:21 PM 15,360 BusinessObjects.Enterprise.Desktop.CommonConnection.dll
11/29/2011 10:21 PM 14,848 BusinessObjects.Enterprise.Desktop.DeltaStore.dll
11/29/2011 10:20 PM 11,264 BusinessObjects.Enterprise.Desktop.Designer.dll
11/29/2011 10:21 PM 49,152 BusinessObjects.Enterprise.Desktop.Encyclopedia.dll
11/29/2011 10:22 PM 65,536 BusinessObjects.Enterprise.Desktop.FullClient.dll
11/29/2011 10:22 PM 61,440 BusinessObjects.Enterprise.Desktop.FullClientAddin.dll
11/29/2011 10:22 PM 61,440 BusinessObjects.Enterprise.Desktop.FullClientTemplate.dll
11/29/2011 10:20 PM 10,752 BusinessObjects.Enterprise.Desktop.Inbox.dll
11/29/2011 10:20 PM 32,768 BusinessObjects.Enterprise.Desktop.InfoView.dll
11/29/2011 10:21 PM 24,576 BusinessObjects.Enterprise.Desktop.MDAnalysis.dll
11/29/2011 10:20 PM 28,672 BusinessObjects.Enterprise.Desktop.MyInfoView.dll
11/29/2011 10:20 PM 49,152 BusinessObjects.Enterprise.Desktop.Overload.dll
11/29/2011 10:20 PM 11,776 BusinessObjects.Enterprise.Desktop.PersonalCategory.dll
11/29/2011 10:20 PM 15,872 BusinessObjects.Enterprise.Desktop.Profile.dll
11/29/2011 10:20 PM 94,208 BusinessObjects.Enterprise.Desktop.Publication.dll
11/29/2011 10:22 PM 11,776 BusinessObjects.Enterprise.Desktop.ReportConvTool.dll
11/29/2011 10:22 PM 28,672 BusinessObjects.Enterprise.Desktop.ScopeBatch.dll
11/29/2011 10:22 PM 28,672 BusinessObjects.Enterprise.Desktop.SearchApp.dll
11/29/2011 10:20 PM 11,776 BusinessObjects.Enterprise.Desktop.StrategyBuilder.dll
11/29/2011 10:20 PM 28,672 BusinessObjects.Enterprise.Desktop.Universe.dll
11/29/2011 10:20 PM 65,536 BusinessObjects.Enterprise.Desktop.Webi.dll
11/29/2011 10:20 PM 36,864 BusinessObjects.Enterprise.Desktop.WebIntelligence.dll
11/29/2011 10:21 PM 32,768 BusinessObjects.Enterprise.Dest.Managed.dll
11/29/2011 10:17 PM 172,032 BusinessObjects.Enterprise.Plugins.dll
11/29/2011 10:23 PM 81,920 BusinessObjects.Enterprise.Providers.dll
11/29/2011 10:20 PM 36,864 BusinessObjects.Enterprise.PublicationJni.dll
11/29/2011 10:17 PM 294,912 BusinessObjects.Enterprise.Sdk.dll
11/29/2011 10:03 PM 1,204,224 BusinessObjects.Enterprise.Sdk.ebus.netmodule
11/29/2011 10:03 PM 77,824 BusinessObjects.Enterprise.Sdk.fssl.netmodule
11/29/2011 10:17 PM 1,363,968 BusinessObjects.Enterprise.Sdk.netmodule
11/29/2011 10:03 PM 364,544 BusinessObjects.Enterprise.Sdk.Ssl.netmodule
11/29/2011 10:17 PM 22,016 BusinessObjects.Enterprise.Sdk.ZipLib.netmodule
11/29/2011 10:05 PM 32,768 BusinessObjects.Foundation.Logging.dll
11/29/2011 10:23 PM 9,216 BusinessObjects.Publisher.DynamicRecipients.dll
10/02/2011 07:57 PM 93,227 CrystalDecisions.CrystalReports.Engine.xml
11/29/2011 10:21 PM 24,576 CrystalDecisions.Enterprise.Admin.Audit.dll
11/29/2011 10:21 PM 19,456 CrystalDecisions.Enterprise.Admin.CachePageServer.dll
11/29/2011 10:21 PM 12,800 CrystalDecisions.Enterprise.Admin.Cms.dll
11/29/2011 10:21 PM 10,240 CrystalDecisions.Enterprise.Admin.EventServer.dll
11/29/2011 10:21 PM 12,288 CrystalDecisions.Enterprise.Admin.FileServer.dll
11/29/2011 10:21 PM 11,776 CrystalDecisions.Enterprise.Admin.JobServer.dll
11/29/2011 10:21 PM 11,264 CrystalDecisions.Enterprise.Admin.ReportAppServer.dll
11/29/2011 10:21 PM 7,168 CrystalDecisions.Enterprise.Admin.SingleSignOn.dll
11/29/2011 10:21 PM 32,768 CrystalDecisions.Enterprise.Auth.secEnterprise.dll
11/29/2011 10:21 PM 45,056 CrystalDecisions.Enterprise.Auth.secLDAP.dll
11/29/2011 10:21 PM 32,768 CrystalDecisions.Enterprise.Auth.secWinAD.dll
11/29/2011 10:21 PM 13,824 CrystalDecisions.Enterprise.Auth.secWindowsNT.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Calendar.dll
11/29/2011 10:19 PM 28,672 CrystalDecisions.Enterprise.Desktop.Connection.dll
11/29/2011 10:21 PM 28,672 CrystalDecisions.Enterprise.Desktop.CustomRole.dll
11/29/2011 10:19 PM 15,360 CrystalDecisions.Enterprise.Desktop.Event.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Excel.dll
11/29/2011 10:18 PM 11,264 CrystalDecisions.Enterprise.Desktop.FavoritesFolder.dll
11/29/2011 10:19 PM 28,672 CrystalDecisions.Enterprise.Desktop.Flash.dll
11/29/2011 10:18 PM 10,752 CrystalDecisions.Enterprise.Desktop.Folder.dll
11/29/2011 10:20 PM 28,672 CrystalDecisions.Enterprise.Desktop.Hyperlink.dll
11/29/2011 10:19 PM 32,768 CrystalDecisions.Enterprise.Desktop.LicenseKey.dll
11/29/2011 10:19 PM 28,672 CrystalDecisions.Enterprise.Desktop.ObjectPackage.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Pdf.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Powerpoint.dll
11/29/2011 10:20 PM 40,960 CrystalDecisions.Enterprise.Desktop.Program.dll
11/29/2011 10:22 PM 136,616 CrystalDecisions.Enterprise.Desktop.Report.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Rtf.dll
11/29/2011 10:19 PM 86,016 CrystalDecisions.Enterprise.Desktop.Server.dll
11/29/2011 10:19 PM 15,360 CrystalDecisions.Enterprise.Desktop.ServerGroup.dll
11/29/2011 10:18 PM 11,776 CrystalDecisions.Enterprise.Desktop.Shortcut.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Txt.dll
11/29/2011 10:19 PM 45,056 CrystalDecisions.Enterprise.Desktop.User.dll
11/29/2011 10:19 PM 40,960 CrystalDecisions.Enterprise.Desktop.UserGroup.dll
11/29/2011 10:19 PM 36,864 CrystalDecisions.Enterprise.Desktop.Word.dll
11/29/2011 10:19 PM 28,672 CrystalDecisions.Enterprise.Desktop.Xcelsius.dll
11/29/2011 10:21 PM 14,848 CrystalDecisions.Enterprise.Dest.DiskUnmanaged.dll
11/29/2011 10:21 PM 15,360 CrystalDecisions.Enterprise.Dest.Ftp.dll
11/29/2011 10:21 PM 36,864 CrystalDecisions.Enterprise.Dest.Smtp.dll
11/29/2011 10:22 PM 66,976 CrystalDecisions.Enterprise.Framework.dll
11/29/2011 10:22 PM 234,912 CrystalDecisions.Enterprise.InfoStore.dll
11/29/2011 10:22 PM 46,504 CrystalDecisions.Enterprise.PluginManager.dll
11/29/2011 10:18 PM 7,168 CrystalDecisions.Enterprise.Utils.UtcConverter.dll
11/29/2011 11:27 PM 5,632 CrystalDecisions.Enterprise.Viewing.ReportSource.dll
11/29/2011 11:27 PM 65,536 CrystalDecisions.ReportAppServer.ClientDoc.dll
11/29/2011 11:26 PM 53,248 CrystalDecisions.ReportAppServer.CommLayer.dll
11/29/2011 11:26 PM 139,264 CrystalDecisions.ReportAppServer.CommonControls.dll
11/29/2011 11:26 PM 40,960 CrystalDecisions.ReportAppServer.CommonObjectModel.dll
11/29/2011 11:27 PM 176,128 CrystalDecisions.ReportAppServer.Controllers.dll
11/29/2011 11:27 PM 40,960 CrystalDecisions.ReportAppServer.CubeDefModel.dll
11/29/2011 11:27 PM 249,856 CrystalDecisions.ReportAppServer.DataDefModel.dll
11/29/2011 11:27 PM 6,656 CrystalDecisions.ReportAppServer.ObjectFactory.dll
11/29/2011 11:27 PM 159,744 CrystalDecisions.ReportAppServer.Prompting.dll
11/29/2011 11:27 PM 360,448 CrystalDecisions.ReportAppServer.ReportDefModel.dll
11/29/2011 11:26 PM 17,920 CrystalDecisions.ReportAppServer.XmlSerialize.dll
10/02/2011 07:57 PM 1,730 CrystalDecisions.ReportSource.xml
10/02/2011 07:57 PM 128,432 CrystalDecisions.Shared.xml
10/02/2011 07:57 PM 48,680 CrystalDecisions.Web.xml
10/02/2011 07:57 PM 27,339 CrystalDecisions.Windows.Forms.xml
03/09/2012 11:32 AM <DIR> dotnet2
11/29/2011 09:57 PM 28,672 FlashControlV71.dll
10/02/2011 08:00 PM 249,856 log4net.dll
11/29/2011 09:57 PM 32,768 ShockwaveFlashObjects.dll
108 File(s) 8,334,368 bytes
3 Dir(s) 2,225,537,024 bytes free
Notice there is also a dotnet2 directory in that directory. Here's that directory listing:
C:\dev\sources\VideoView_6_9\video\nextlink>dir c:\dev\BusinessObjects\Common\4.
0\managed\dotnet2
Volume in drive C has no label.
Volume Serial Number is F8B0-9C11
Directory of c:\dev\BusinessObjects\Common\4.0\managed\dotnet2
03/09/2012 11:32 AM <DIR> .
03/09/2012 11:32 AM <DIR> ..
11/29/2011 11:29 PM 98,304 CrystalDecisions.CrystalReports.Design.dll
11/29/2011 11:29 PM 413,696 CrystalDecisions.CrystalReports.Engine.dll
10/02/2011 07:57 PM 93,227 CrystalDecisions.CrystalReports.Engine.xml
11/30/2011 12:04 AM 32,768 CrystalDecisions.Data.AdoDotNetInterop.dll
11/29/2011 11:29 PM 49,152 CrystalDecisions.ReportAppServer.DataSetConversion.dll
11/29/2011 11:29 PM 110,592 CrystalDecisions.ReportSource.dll
10/02/2011 07:57 PM 1,730 CrystalDecisions.ReportSource.xml
11/29/2011 11:29 PM 774,144 CrystalDecisions.Shared.dll
10/02/2011 07:57 PM 128,432 CrystalDecisions.Shared.xml
11/29/2011 11:29 PM 335,872 CrystalDecisions.VSDesigner.dll
11/29/2011 11:29 PM 503,808 CrystalDecisions.Web.dll
10/02/2011 07:57 PM 48,680 CrystalDecisions.Web.xml
11/29/2011 11:29 PM 528,384 CrystalDecisions.Windows.Forms.dll
10/02/2011 07:57 PM 27,339 CrystalDecisions.Windows.Forms.xml
03/09/2012 11:32 AM <DIR> en
14 File(s) 3,146,128 bytes
3 Dir(s) 2,225,385,472 bytes free
That directory is not used in our project, but it has been in the past. Notice that that directory does have the CrystalDecisions.CrystalReports.Engine.dll file. But, I'm assuming I should not be using that directory as part of my build as it seems to be referencing an older version of the .NET Framework.
Please advise as to why that CrystalDecisions.CrystalReports.Engine.dll file is not in the managed directory when I install Crystal Reports 2008 SP5 (full version install).
Thanks.
you need to set your path to the dotnet2 folder
/AI c:\dev\BusinessObjects\Common\4.0\managed\dotnet2
I'm not sure why you do not have the dll in your \managed folder, but there are typically two versions of the Engine dll installed.
the one in the \managed folder is complied for applications using the 1.1 framework (ie VS2003)
this dll would have a version number like 12.3.1100.1190 for SP5.
the one in the \managed\dotnet2 folder is compiled for applications using the 2.0 (or higher) framework (ie VS2005 or VS2008).
this dll would have a version number like 12.3.2000.1190 for SP5
Its possible that the install recognized that you only had VS2005 on your machine and gave you the runtime compatable with the 2.0/3.5 frameworks. If you do not want to use the dotnet2 folder in your complile commandline (cl.exe), then just copy the dlls to the Managed folder. All of the other dlls in the managed folder will work on 1.1 or 2.0 frameworks, but the CrystalDecisions.CrystalReports.Engine, Shared, ReportSource, Web and Windows.Forms dlls are managed components that had to be compiled separately due to the differences between the two frameworks.
Dan
In the past, our build has used the "dotnet2" folder. I recently changed it to use the "managed" folder, when I added calls to the "RAS" API. Here's a note I have in some of my recently checked in code revisions:
Also, converted the PDF and Print routines to use the newer "RAS" Crystal Reports API methods (recommended by SAP).
But, when I try to compile with the "dotnet2" folder specified, I get this error message:
cl -I. -I.././IDL -I.././Infrastructure -Ic:\dev\iona\include -Ic:\dev\SourcePro -nologo -W3 -GR -vmg -Od -MD -Zi -Zm200 -DWIN32 -DWIN32_LEAN_AND_MEAN -DVERSANT_ANSI -D_CRT_SECURE_NO_DEPRECATE -D_AFXDLL /clr /AI c:\dev\BusinessObjects\Common\4.0\managed\dotnet2 -DNDEBUG -DIT_USE_STD_IOSTREAM -DORBIX_DLL -D_RWCONFIG=12d -D_CONSOLE -c main.cpp
main.cpp
c:\dev\sources\videoview_6_8-merge\video\nextlink\reportfaxservice\NReportFaxServiceImpl.h(17) : fatal error C1107: could not find assembly 'CrystalDecisions.ReportAppServer.ClientDoc.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
NMAKE : fatal error U1077: 'c:\dev\VisualStudio\VC\bin\cl.EXE' : return code '0x
2'
Stop.
As you can see from the directory listings that I gave earlier, that particular assembly is in the "managed" folder but not in the "dotnet2" folder.
So, should I leave the "/AI" setting at "managed" and copy the CrystalDecisions.CrystalReports.Engine.dll to the "managed" directory from the "dotnet2" directory. Or should I put the "/AI" setting at the "dotnet2" directory and copy the necessary files from the "managed" directory to the "dotnet2" directory?
It's a bummer that I'll have to do this on all the machines where we use Crystal Reports (all of our development machines, or QA hosts, and our production host). Is there a reason why all the necessary files aren't in both directories? Can this be remedied in future versions of Crystal Reports so we can compile our code with the installation without having to make manual tweaks to the installation?
Thanks.
If you need references to the RAS runtime as well, then your best option is to probably copy all of the dlls in the dotnet2 folder to the managed folder.
The reason for the two folders is that Crystal Reports 2008 is supported on both the 1.1 and 2.0 frameworks, but there are significant differences between the two frameworks so versions had to be compiled for each framework. Its not an issue if you're compiling in the IDE as the integration with the IDE knows where to look.
In your case, the command line complier doesn't seem to have that logic, so I think you are stuck with the manual workaround or a bigger command line with paths referencing each dll. In CR for VS2010 all of the runtime (CR and RAS) is compiled on the 2.0 framework and the need for multiple versions doesn't exist since CR for VS2010 runtime isn't supported on the 1.1 framework.
Good to know that Crystal Reports for Visual Studio 2010 won't have this problem. We'll upgrade to that environment soon.
As far as our current configuration, it appears that if we compile like so, it compiles and links:
cl -I. -I.././IDL -I.././Infrastructure -Ic:\dev\iona\include -Ic:\dev\SourcePro -nologo -W3 -GR -vmg -Od -MD -Zi -Zm200 -DWIN32 -DWIN32_LEAN_AND_MEAN -DVERSANT_ANSI -D_CRT_SECURE_NO_DEPRECATE -D_AFXDLL /clr /AI c:\dev\BusinessObjects\Common\4.0\managed /AI c:\dev\BusinessObjects\Common\4.0\managed\dotnet2 -DNDEBUG -DIT_USE_STD_IOSTREAM -DORBIX_DLL -D_RWCONFIG=12d -D_CONSOLE -c main.cpp
main.cpp
Notice I have now included two /AI parameters: one for the managed directory and one for the managed/dotnet2 directory.
Now that the code is compiling and linking, I'll configure our QA environment this way, and go through some runtime testing. If the runtime testing works, this configuration should work fine. I can tweak out build files to add that second /AI parameter, and then we won't have to manually manipulate the Crystal Reports configuration.
Thanks.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.