PDA

View Full Version : QT Project in VS2008 and Custom DLL and Header problem



english_dany
22nd November 2010, 16:50
Hello Guys,
I am developing QT based project in VS2008, It working fine apart from one problem that when I try to use a custom DLL file its give me quite a few errors which I cannot understand ,
As soon as i include the header file with the statement

#include "DTKANPR.h"
It gives me these errors


1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : error C2146: syntax error : missing ';' before identifier 'ILicManager'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : error C2146: syntax error : missing ';' before identifier 'ILicManager'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : error C2086: 'int ILicManager' : redefinition
1> I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(50) : see declaration of 'ILicManager'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(56) : error C2146: syntax error : missing ';' before identifier 'IPlate'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(62) : error C2146: syntax error : missing ';' before identifier 'IPlateCollection'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(68) : error C2146: syntax error : missing ';' before identifier 'IANPREngine'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(74) : error C2146: syntax error : missing ';' before identifier 'IVideoCapture'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(80) : error C2146: syntax error : missing ';' before identifier '_IANPREngineEvents'
1>I:\Program Files\DTK Software\DTK ANPR SDK\Bin\DTKANPR.h(122) : error C2146: syntax error : missing ';' before identifier '_IVideoCaptureEvents'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(53) : error C2146: syntax error : missing ';' before identifier 'IEnumConnections'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(59) : error C2146: syntax error : missing ';' before identifier 'IConnectionPoint'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(65) : error C2146: syntax error : missing ';' before identifier 'IEnumConnectionPoints'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(71) : error C2146: syntax error : missing ';' before identifier 'IConnectionPointContainer'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(77) : error C2146: syntax error : missing ';' before identifier 'IClassFactory2'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(83) : error C2146: syntax error : missing ';' before identifier 'IProvideClassInfo'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(89) : error C2146: syntax error : missing ';' before identifier 'IProvideClassInfo2'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(95) : error C2146: syntax error : missing ';' before identifier 'IProvideMultipleClassInfo'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(101) : error C2146: syntax error : missing ';' before identifier 'IOleControl'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(107) : error C2146: syntax error : missing ';' before identifier 'IOleControlSite'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(113) : error C2146: syntax error : missing ';' before identifier 'IPropertyPage'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(119) : error C2146: syntax error : missing ';' before identifier 'IPropertyPage2'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(125) : error C2146: syntax error : missing ';' before identifier 'IPropertyPageSite'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(131) : error C2146: syntax error : missing ';' before identifier 'IPropertyNotifySink'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(137) : error C2146: syntax error : missing ';' before identifier 'ISpecifyPropertyPages'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(143) : error C2146: syntax error : missing ';' before identifier 'IPersistMemory'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(149) : error C2146: syntax error : missing ';' before identifier 'IPersistStreamInit'
1>I:\Program Files\Microsoft SDKs\Windows\v6.0A\include\ocidl.h(155) : error C2146: syntax

Which I cannot understand why its giving me these errors, I tried to include <windows.h> before the custom header but still no use. its just keep giving me these error no matter what i change , Please help me if you any one know how to fix this problem,Thanks in advance

Added after 1 50 minutes:

Hello guys ,
Its again me, I think i found the solution for this problem , It took me one week to find this simple answer,
The problem was about putting the header file in the right place, I put the header file instead of my class my put that in my first project file.
If you are getting the same error ,I will recommend to find a place where you think your compiler starts to read for the header file the very first point and place your header file over there and i think should work, but most of the time the problem solves when you include <windows.h> before before the header file. Hope this post will help someone out there .. Cheers Bye