3

Installed VS2010 Ultimate on my desktop workstation - Dell Precision T3500 (Windows 7 64bit OS), and on my IBM ThinkPad R51 (Windows XP Sp3 32bit).

I am having problems building solutions on the StinkPad, and cannot figure out why. As listed below, the build output for a compiler built ADO library lists the following errors:

c:\wpds\debug\msjro.tlh(196): error C2146: syntax error : missing ';' before identifier 'ConflictTables' c:\wpds\debug\msjro.tlh(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\wpds\debug\msjro.tlh(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\wpds\debug\msjro.tlh(224): error C2146: syntax error : missing ';' before identifier 'GetConflictTables' c:\wpds\debug\msjro.tlh(224): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

I have checked to make sure that all include, exe, and library paths are correct for all projects and solutions. Any insight will be greatly appreciated. Thanks Bill

Bill Miller
  • 71
  • 1
  • 7

2 Answers2

2

I encountered this same problem when compiling for the first time with a new version of msado15.dll. There are dependencies between msado15.dll and msjro.dll, as evidenced by these lines at the top of msjro.tlb:

// Cross-referenced type libraries:
//
//  #import "C:\Program Files (x86)\Common Files\System\ado\msado15.dll"
//

In my case, the problem arose because I'm building my app on Windows 7, and the SP1 update includes a breaking change in msado15.dll that will cause the application to fail on Windows XP. When I fixed this problem using this KB, my msado dll problems were fixed but my msjro.tlb stopped compiling. There is probably a way to update msjro to reference the desired/correct msado (in my case, msado60_Backcompat.tlb as installed in the KB), but if you're using CADODatabase classes defined in ado2.cpp and ado2.h, and if you're not using jet-specific features, a simpler fix is to just comment-out the portions of ado2.h and ado2.cpp that reference jet.
I just commented out this line in ado2.h:

//#import <MSJRO.DLL> no_namespace rename("ReplicaTypeEnum", "_ReplicaTypeEnum") 

and also #ifdef'd out all of the implementations of CJetEngine methods in ado2.cpp, and that worked for me.

Good luck!

rfeague
  • 413
  • 3
  • 11
1

I had this problem too. Then I compared the MSJRO.TLH created on WinXP to the one created on Win7. On WinXP the declaration was

ADODB::_RecordsetPtr ...

on Win7 it was

_RecordsetPtr ...

I guessed that the problem might be related to namespaces. MSADO15.TLH defines a namespace -"ADODB". So I placed:

using namespace ADODB;

before my import of the Jet.

#import "MSJRO.DLL"

This got rid of the errors for me.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
dchang
  • 11
  • 1