Git Product home page Git Product logo

Comments (9)

sbredahl avatar sbredahl commented on July 22, 2024

Are you sure it is actually a DLL file? I remember having a similar issue some time ago (with cmake maybe, not sure) where the resulting libssh2.dll was actually a static library with a wrong extension.

from libssh2.

alamaison avatar alamaison commented on July 22, 2024

On Thu, 26 May 2016 18:46 Chris, [email protected] wrote:

I am trying to compile libssh2 under Windows 10 environment with NMake. It
is compiling with no issues but is only producing a DLL rather then a LIB
file. I've gone through your documentation and have not seen anything
regarding static libraries for Windows.

If you're not already doing so, please generate the NMake file using CMake.
Make sure you set the BUILD_SHARED_LIBS option to OFF. That's the default
but you might have set it accidentally.

from libssh2.

ccarv avatar ccarv commented on July 22, 2024

@alamaison That is what I originally did but I noticed nothing really changed. Here is my command line:

cmake -G "NMake Makefiles"

Is there something I am missing?

@sbredahl I had hopes for a second... but verified it's a shared library.

from libssh2.

alamaison avatar alamaison commented on July 22, 2024

from libssh2.

ccarv avatar ccarv commented on July 22, 2024

@alamaison Tried that and no luck. Is this suppose to completely replace my NMakefile? I renamed it and cmake did not generate a new one.

Is there more documentation somewhere on this? I'm afraid that my environment is the reason this won't generate the new build files.

from libssh2.

alamaison avatar alamaison commented on July 22, 2024

Are you talking about the NMakefile in the project root directory? CMake won't touch that. It generates a separate build directory with the NMakefile in. Where did you tell CMake to use as binary directory? Check there.

I realise it's confusing having the NMakefile in the root directory too. The repo contains several hardcoded build files for Windows but they aren't well maintained and you can't configure many options. The ones you generate with CMake are all generated from the same source. So anything you can do with one type, you can do with all of them.

from libssh2.

ccarv avatar ccarv commented on July 22, 2024

@alamaison Ah. That's what I was confused about. I ran the cmake build and was able to create the build files. I am generating my static library now.

My last question, is there something I need to set for a 64bit compile?

from libssh2.

alamaison avatar alamaison commented on July 22, 2024

CMake decides which compiler to choose for NMake based on the environment. So to configure a 64-bit build, you need to run cmake from the 64-bit command prompt that came with your compiler. Remember to use a fresh build directory.

from libssh2.

ccarv avatar ccarv commented on July 22, 2024

Ah. Okay. This is my first time using CMake. I was attempting to target 64bit after I had compiled the build files. I opened up the VS project file and noticed the targets were all set for x86. Rebuilt with Win64 arch set and compiled.

from libssh2.

Related Issues (20)

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.