Giter Site home page Giter Site logo

Comments (7)

Sibras avatar Sibras commented on May 29, 2024

The static libs are named libssh.lib and libsshd.lib for release/debug respectively. It should only ask for ssh.ddl if you link against ssh.lib (note the missing lib prefix)

from libssh.

dxxzero avatar dxxzero commented on May 29, 2024

Hello,

I have added following settings in the project settings:

  1. VC++ Directories -> Include Directories: The path to your header files (..\libssh_libssh-0.9.3-2_msvc16\include)
  2. Linker -> General -> Additional Library Directories: The path to your ssh.lib file: (..\libssh_libssh-0.9.3-2_msvc16\lib\x86)
  3. Linker -> Input -> Additional Dependencies: Addes ssh.lib to the list.

The project compiles fine but it generates ssh.dll next to the project.exe file. But I want to ship the exe file without shipping the dll file. Can you tell me how to tell Visual Studio to embed the lib file into the project and not to create a dll file for it?

a

from libssh.

Sibras avatar Sibras commented on May 29, 2024

Linker -> Input -> Additional Dependencies: Addes ssh.lib to the list.

As I said this should be "libssh.lib" not "ssh.lib", the later is the one that requires the dll, the former does not.

from libssh.

dxxzero avatar dxxzero commented on May 29, 2024

But if I want to build the project with the "libssh.lib file I receive unresolved external symbol errors.

For example:
unr

from libssh.

Sibras avatar Sibras commented on May 29, 2024

When using a static version of libssh (i.e. no dll) you need to define "LIBSSH_STATIC" before including any libssh headers.

from libssh.

dxxzero avatar dxxzero commented on May 29, 2024

Yes I did, still getting the same result :/

from libssh.

Sibras avatar Sibras commented on May 29, 2024

Well your doing it wrong ;) I cant reproduce any errors with any of the projects i have that use libssh, they all work fine with LIBSSH_STATIC defined. To ensure you are defining it correctly in all places try adding it to the project settings instead of defining it in code. Also within Visual Studio if you have correctly defined it then when browsing libssh.h you should notice that LIBSSH_API has been defined as empty. The "__imp__xxx" errors you are getting are caused when LIBSSH_API is being defined to one of the __declspec definitions.

from libssh.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.