Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vikhyath-vec
    @Vikhyath-vec

    the libpq is a depandecy of drogon and automatically added.

    but when I run the makefile, it still gives me errors which usually come when I don't include the flags

    any specific commands to just add those flags? I'm weak in cmake :(
    João Fernandes
    @0rangeFox
    Hey guys, there's anything is possible to work with mapper's chain interface for coro?
    João Fernandes
    @0rangeFox

    I could do this.

    CoroMapper<Users> usersMapper(app().getFastDbClient());
    usersMapper.limit(1).offset(0);
    
    for (const Users &user : co_await usersMapper.findAll()) {
    }

    But isn't there another way to write on one line like Mapper?

    RamithKS
    @ramithKS
    Hey everyone,
    I’m a beginner to drogon framework and I’m finding it difficult to install the drogon package on Mac .
    Can anyone help me how to install it using vcpkg or using any other way ?
    I tried “vcpkg install drogon” but it’s showing some error at the end .
    Rafał Bugajewski
    @rbugajewski
    @ramithKS You can try the Homebrew version.
    You can install Drogon on macOS with this one command: brew install rbugajewski/drogon/drogon
    I also added head to the formula, so that you can always install the latest development version with the --HEAD command line argument.
    You can also use the official URL now, because the repositories were moved to the organization: brew install drogonframework/drogon/drogon (yes, that’s drogon twice)
    RamithKS
    @ramithKS
    Now I cloned it and installed according to their official documentation but the drogon autocompletes are working only if I copy and paste the drogon file to respected project I’m working on
    Is there any other way ?
    Is it necessary to put that into the project folder ?
    Martin Chang
    @marty1885
    Which file are you copying? And which IDE are you using?
    In most cases, CMake should pull in all the information you need.
    RamithKS
    @ramithKS
    I’m copying the whole drogon folder which I cloned
    I’m using vs code IDE
    Can anyone instruct me step by step to install drogon and other dependencies in Mac ?
    RamithKS
    @ramithKS
    Please please . Help me with this :gf
    • this issue
    Rafał Bugajewski
    @rbugajewski

    @ramithKS If you have issues installing Drogon from source, you can try the Homebrew formula, as it also compiles from source.

    Regarding your VSCode issue, I’m not sure, because I don’t use that editor, but I would suspect that you would have to tell the editor project configuration where your header search paths are in order to get full completion. Otherwise the LSP-Server won’t find signatures for completion.

    RamithKS
    @ramithKS
    Hey , the issue is not regarding the IDE .
    @rbugajewski can u send me the setup using Homebrew
    ??
    Martin Chang
    @marty1885
    @ramithKS You just run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" to install homebrew itself. Then brew install drogonframework/drogon/drogon to install drogon.
    RamithKS
    @ramithKS
    Okasy
    Okay *
    cannot open source file "json/json.h" (dependency of "drogon/drogon.h")C/C++(1696)
    now getting this error
    Martin Chang
    @marty1885
    Are you getting the error in your project? Or during building drogon?
    RamithKS
    @ramithKS
    In the project
    Martin Chang
    @marty1885
    Hos did you created the project? Are you using CMake?
    RamithKS
    @ramithKS
    I used the drogon command
    dg_ctl create project project_name
    RamithKS
    @ramithKS
    Now i fixed that error
    Now getting the following error when i run cmake .. and make command under build folder of my project
    CMake Error at /opt/homebrew/Cellar/cmake/3.21.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
      system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
      OPENSSL_INCLUDE_DIR)
    Call Stack (most recent call first):
      /opt/homebrew/Cellar/cmake/3.21.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      /opt/homebrew/Cellar/cmake/3.21.0/share/cmake/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args)
      /opt/homebrew/Cellar/cmake/3.21.0/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
      /opt/homebrew/lib/cmake/Trantor/TrantorConfig.cmake:38 (find_dependency)
      /opt/homebrew/Cellar/cmake/3.21.0/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
      /opt/homebrew/lib/cmake/Drogon/DrogonConfig.cmake:40 (find_dependency)
      CMakeLists.txt:29 (find_package)
    RamithKS
    @ramithKS
    can anyone help ??
    Martin Chang
    @marty1885
    @rbugajewski Do you know what's going on?
    RamithKS
    @ramithKS
    i think i need to add its path
    ig
    RamithKS
    @ramithKS
    But i am super consfused rn
    Rafał Bugajewski
    @rbugajewski
    OpenSSL is probably located at an unknown location, e. g. /usr/local/Cellar/openssl@1.1/1.1.1k/
    you have to export an environment variable, don’t know how that’s done in VSCode: export OPENSSL_ROOT_DIR="/usr/local/opt/openssl/"
    this is a symlink to the current OpenSSL version installed by Homebrew, so that you won’t have to update it every time you’ll update OpenSSL
    RamithKS
    @ramithKS
    now every errors in the projects got resolved but getting the error while running make in terminal
    ramithks@Ramiths-MacBook-Air build % make
    [ 50%] Building CXX object CMakeFiles/test-pro.dir/main.cc.o
    /Users/ramithks/Desktop/development/c++/test-pro/main.cc:1:10: fatal error: 'drogon/drogon.h' file not found
    #include <drogon/drogon.h>
             ^~~~~~~~~~~~~~~~~
    1 error generated.
    make[2]: *** [CMakeFiles/test-pro.dir/main.cc.o] Error 1
    make[1]: *** [CMakeFiles/test-pro.dir/all] Error 2
    make: *** [all] Error 2
    RamithKS
    @ramithKS
    can anyone help with this ?
    Please
    An Tao
    @an-tao
    was the test-pro created by drogon_ctl?