Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C++ syntax error : missing ';' before '*'
QtWS25 Last Chance

C++ syntax error : missing ';' before '*'

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GGILOYAN
    wrote on last edited by
    #1

    Hi
    I have this code

    @#ifndef SHELLUTILS_H
    #define SHELLUTILS_H

    #ifdef SHELLUTILS_EXPORTS
    #define SHELLUTILS_API __declspec(dllexport) __stdcall
    #else
    #define SHELLUTILS_API __declspec(dllimport) __stdcall
    #endif

    extern "C"
    {

    typedef wchar_t* (__stdcall *SelectedFilesFunc)();
    typedef void (__stdcall FreeSelectedFilesFunc)(wchar_t buff);
    /*typedef HRESULT (__stdcall CreateShortCutFunc)(LPCSTR pszTargetfile, LPCSTR pszTargetargs,
    LPCSTR pszLinkfile, LPCSTR pszDescription,
    int iShowmode, LPCSTR pszCurdir,
    LPCSTR pszIconfile, int iIconindex);
    /

    SHELLUTILS_API wchar_t* SelectedFiles();
    SHELLUTILS_API void FreeSelectedFiles(wchar_t* buff);
    /SHELLUTILS_API HRESULT __stdcall CreateShortCut(LPCSTR pszTargetfile, LPCSTR pszTargetargs,
    LPCSTR pszLinkfile, LPCSTR pszDescription,
    int iShowmode, LPCSTR pszCurdir,
    LPCSTR pszIconfile, int iIconindex);
    /

    }

    #endif //SHELLUTILS_H@@@

    When I compile this code in VS 2010 I get the following error

    Error 8 error C2143: syntax error : missing ';' before '*' C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
    Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
    Error 11 error C2377: 'wchar_t' : redefinition; typedef cannot be overloaded with any other symbol C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
    Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
    Error 13 error C2062: type 'void' unexpected C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 21 1 simpleshare

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      This is rather a Visual Studio question. You should ask this question on the Microsoft Developer Network forums

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GGILOYAN
        wrote on last edited by
        #3

        OK , thanks

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved