Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This repo does not contain a Project file #1

Open
boldorider4 opened this issue Feb 20, 2020 · 3 comments
Open

This repo does not contain a Project file #1

boldorider4 opened this issue Feb 20, 2020 · 3 comments

Comments

@boldorider4
Copy link

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:

  • The project file you're referencing in your README.md is missing entirely and your tutorial about how to export the dll library is very poorly explained.
  • People that are interested in such a project are Linux guys who are forced to work with Windows and they more often than not don't know how dlltool or lib work. Granted, google helps, but what you're trying to do is very unclear.
  • Please add a requirements section, explaining how the toolchain should be configured to use such Makefiles. So far I understood you expect us to use Cygwin, but those makefiles still don't build properly with a properly chosen toolchain.
@Biswa96
Copy link
Owner

Biswa96 commented Feb 20, 2020

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
Copy link
Author

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
Copy link

rescenic commented May 20, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants