Biswa96 / WSLInstall

Install any GNU/Linux userspace in WSL
GNU General Public License v3.0
254 stars 28 forks source link

This repo does not contain a Project file #1

Open boldorider4 opened 4 years ago

boldorider4 commented 4 years ago

Hey man,

first kudos on creating such a project. It is even referenced in some ubuntu official WSL guide.

But sorry to say, this repo is anything but well taken care of:

Biswa96 commented 4 years ago

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.

boldorider4 commented 4 years ago

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
rescenic commented 4 years ago

=============================================================================
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