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. QT how to use libssh2
Forum Updated to NodeBB v4.3 + New Features

QT how to use libssh2

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.7k Views 1 Watching
  • 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 Offline
    B Offline
    baoniu
    wrote on last edited by
    #1

    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
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      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
      0
      • B Offline
        B Offline
        baoniu
        wrote on last edited by
        #3

        @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
        0

        • Login

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