Coder Social home page Coder Social logo

Comments (10)

iamsergio avatar iamsergio commented on July 29, 2024

Yep, tested on Windows, many people are using it.

Here's my steps, which I've just tested on a random laptop:

Open a cmd.exe suitable for development (Qt, compiler, cmake, ninja in PATH)

cd kddockwidgets_sources/
mkdir build/
cd build/
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=c:\kddockwidgets_installed ..
ninja
ninja install
cd ..\examples\dockwidgets
cmake -DCMAKE_PREFIX_PATH=C:\kddockwidgets_installed .
ninja
set PATH=%PATH%;c:\kddockwidgets_installed\bin
kddockwidgets_example.exe

Let me know if it worked

from kddockwidgets.

samuelyhsu avatar samuelyhsu commented on July 29, 2024

Thanks for your reply,but same error occurred when I run
cmake -DCMAKE_PREFIX_PATH=C:\kddockwidgets_installed .

CMake Error at CMakeLists.txt:10 (find_package):
Could not find a configuration file for package "KDDockWidgets" that is
compatible with requested version "".
The following configuration files were considered but not accepted:
C:/kddockwidgets_installed/lib/cmake/KDDockWidgets/KDDockWidgetsConfig.cmake, version: 0.1 (64bit)
-- Configuring incomplete, errors occurred!
See also "D:/.../KDDockWidgets/examples/dockwidgets/CMakeFiles/CMakeOutput.log".
CMakeOutput.log

from kddockwidgets.

iamsergio avatar iamsergio commented on July 29, 2024

Looks like you're building an app in 32-bit mode (according to CMakeOutput.log) against a 64-bit KDDW

from kddockwidgets.

samuelyhsu avatar samuelyhsu commented on July 29, 2024

Hi, I used vcvarsall.bat x86_amd64 incorrectly to initialize the environment before, but it worked fine after switching to vcvarsall.bat x86 or vcvarsall.bat amd64, thanks for the help.
After that, I want to try the example, run ninja(after cmake -DCMAKE_PREFIX_PATH=C:\kddockwidgets_installed .), it said

ninja: error: loading 'build.ninja': The system cannot find the file specified.
I checked, and actually there is no such file.

from kddockwidgets.

samuelyhsu avatar samuelyhsu commented on July 29, 2024

And how should I use it in qt creator? I tried to add library like this
20200218211510
in qt pro file

win32: LIBS += -LC:/kddockwidgets_installed/64bit/lib/ -lkddockwidgets
INCLUDEPATH += C:/kddockwidgets_installed/64bit/include
DEPENDPATH += C:/kddockwidgets_installed/64bit/include
win32:!win32-g++: PRE_TARGETDEPS += C:/kddockwidgets_installed/64bit/lib/kddockwidgets.lib
else:win32-g++: PRE_TARGETDEPS += C:/kddockwidgets_installed/64bit/lib/libkddockwidgets.a

But when I build it, it said

C:\kddockwidgets_installed\64bit\include\kddockwidgets\private\Frame_p.h:31: error: C1083: Cannot open include file: 'docks_export.h': No such file or directory

In fact, not only this one but many files are missing. Please help, thanks.

from kddockwidgets.

iamsergio avatar iamsergio commented on July 29, 2024

first let's get the cmd line build working: also pass -G Ninja to cmake, otherwise it will use whatever is the default generator

Note that ninja isn't a requirement, you can use your usual generator (NMake, etc.)

from kddockwidgets.

samuelyhsu avatar samuelyhsu commented on July 29, 2024

Thanks a lot, It works really amazing, look forward to the official release.
By the way, can you help with how to use it in qt creator. Pardon my ignorance showing...

from kddockwidgets.

samuelyhsu avatar samuelyhsu commented on July 29, 2024

I don't know if there is a better way, but my stupid way is to change the include path one by one, now it worked, thanks

from kddockwidgets.

samuelyhsu avatar samuelyhsu commented on July 29, 2024

Sorry, but I still have a question, as default, it will build the debug version of the library according to the above command? How can I get the release version? When using release mode in qt creator, the build is successful but cannot run

from kddockwidgets.

iamsergio avatar iamsergio commented on July 29, 2024

I don't know which error you got, so will try to guess you're linking debug kddw to a release app, which msvc doesn't support.

A release version needs to be linked to a release version of kddockwidgets (pass -DCMAKE_BUILD_TYPE=Release when building kddw

Closing this now, as KDDW doesn't have any bug.

from kddockwidgets.

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.