Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QT how to use libssh2

    General and Desktop
    2
    3
    3441
    Loading More Posts
    • 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.
    • B
      baoniu last edited by

      Development environment:Qt Creator +mingw + windows7+libssh2(build from VS2010)
      libssh2 build environment:VS2010+zlib1.2.8+openssl1.0.1h+libssh2-1.4.3

      D:\qtObject\libssh2-1.4.3\include\libssh2.h:88: error: expected unqualified-id before string constant
      extern "C" {

      D:\Qt\Qt5.3.1\Tools\mingw482_32\i686-w64-mingw32\include\excpt.h:11: error: expected '}' before end of line
      #pragma pack(push,_CRT_PACKING)

      D:\Qt\Qt5.3.1\Tools\mingw482_32\i686-w64-mingw32\include\excpt.h:-1: At global scope:

      D:\Qt\Qt5.3.1\Tools\mingw482_32\i686-w64-mingw32\include\excpt.h:11: error: expected declaration before end of line

      I am a C + + beginners
      I do not know how to fix this error
      Please help me

      !http://img.bbs.csdn.net/upload/201407/11/1405075928_137857.png(QT error)!

      1 Reply Last reply Reply Quote 0
      • C
        ChrisW67 last edited by

        It looks like (guessing) that you have put
        @
        #include "libssh2.h"
        @
        Inside a function ( main() perhaps) at line 77 of main.cpp rather than outside. Hard to be sure without seeing the code.

        1 Reply Last reply Reply Quote 0
        • B
          baoniu last edited by

          @ChrisW67,thanks
          I am sorry,It was my fault
          I included libssh2 header file in the main function led to this error

          1 Reply Last reply Reply Quote 0
          • First post
            Last post