Results 1 to 1 of 1

Thread: QT Project in VS2008 and Custom DLL and Header problem

  1. #1
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QT Project in VS2008 and Custom DLL and Header problem

    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
    Last edited by english_dany; 22nd November 2010 at 16:50.

Similar Threads

  1. Replies: 1
    Last Post: 19th September 2010, 20:50
  2. Replies: 2
    Last Post: 24th August 2010, 16:47
  3. Replies: 1
    Last Post: 1st June 2010, 08:05
  4. Qt project with .net parts(vs2008)
    By deemeetar in forum Newbie
    Replies: 0
    Last Post: 29th September 2009, 12:30
  5. 4.4tp with vs2008 compile problem
    By Teerayoot in forum Installation and Deployment
    Replies: 1
    Last Post: 11th January 2008, 06:56

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.