Giter VIP home page Giter VIP logo

Comments (3)

Biswa96 avatar Biswa96 commented on May 30, 2024

This repository is not focused to "actual coding", I started this as a guide only (Markdown files). Each C files are a small program so I don't think it need any project file. But I can add a shell script or batch file to automate things. What do you think?

btw, dlltool is available in any mingw-w64 cross-compiler toolchain.

from wslinstall.

boldorider4 avatar boldorider4 commented on May 30, 2024

yeah I learned what dlltool is afterwards.
The problem is that I don't know how to link that wslapi library (should I link a .dll? or the .a file? what is wslapi.def for?) to the C files to generate an .exe. So yes, a batch file or project file to automate the process would help greatly.

Also, you're mentioning mingw-w64 cross-compiler NOW, but so far I've been using gcc/make from CygWin, which I believe, although I'm not sure, is not part of mingw-w64. When I build the main C files I get this:

make

gcc -O2 -Wall -Werror -Wextra -Wundef -o GetDistroConfig GetDistroConfig.c -L"../lib" -lwslapi
GetDistroConfig.c: In function ‘main’:
GetDistroConfig.c:22:28: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘ULONG {aka unsigned int}’ [-Werror=format=]
printf("Version: %lu\n"
~~^
%u
GetDistroConfig.c:22:16: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘ULONG {aka unsigned int}’ [-Werror=format=]
printf("Version: %lu\n"
^~~~~~~~~~~~~~~~
GetDistroConfig.c:23:31: note: format string is defined here
"DefaultUID: %lu\n"
~~^
%u
GetDistroConfig.c:22:16: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘ULONG {aka unsigned int}’ [-Werror=format=]
printf("Version: %lu\n"
^~~~~~~~~~~~~~~~
GetDistroConfig.c:26:56: note: format string is defined here
"Default Environment Variables Count: %lu\n",
~~^
%u
GetDistroConfig.c:30:30: error: format ‘%lX’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘HRESULT {aka int}’ [-Werror=format=]
printf("Error: 0x%08lX\n", result);
~~~~^
%08X
cc1: all warnings being treated as errors
make: *** [Makefile:14: GetDistroConfig] Error 1

from wslinstall.

rescenic avatar rescenic commented on May 30, 2024
=============================================================================
INSTALL DEVELOPER TOOLS
=============================================================================
sudo apt-get install micro nano curl wget sed mawk less htop tmux neofetch ruby figlet toilet fortune
sudo apt install micro nano curl wget sed mawk less htop tmux neofetch ruby figlet toilet fortune
sudo apk add nano curl wget sed mawk less htop tmux neofetch ruby figlet toilet fortune
sudo zypper install nano curl wget sed mawk less htop tmux neofetch ruby figlet toilet fortune
gem install lolcat
-----------------------------------------------------------------------------
sudo apt-get install build-essential
sudo apt install build-essential
sudo apk add build-base gcc abuild binutils binutils-doc gcc-doc cmake cmake-doc extra-cmake-modules extra-cmake-modules-doc
sudo zypper install --type pattern devel_basis
-----------------------------------------------------------------------------
sudo apt-get install sqlite3 libsqlite3-dev
sudo apt install sqlite3 libsqlite3-dev
sudo apk add sqlite sqlite-dev sqlite-libs
sudo zypper install sqlite3 sqlite3-devel sqlite3-doc libsqlite3-0 glibc-32bit libcppdb0 libcppdb_sqlite3-0 libdbi3 libdbi-drivers-dbd-sqlite3 libsqlite3-0-32bit
-----------------------------------------------------------------------------
sudo apt-get install autotools-dev autoconf pkg-config
sudo apt install autotools-dev autoconf pkg-config
sudo apk add libtool autoconf pkg-config
sudo zypper install libtool autoconf pkg-config

from wslinstall.

Related Issues (2)

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.