Skip to content

Conversation

@Arsivnet
Copy link

Hello. I was checking the repo and decided to try out. I added an "installation" part on the readme that also specifies the standard.

The repo compiles successfully both for GNU99 and GNU23. I used both cmake and AutoTools. I modified CmakeLists.txt like so in line 32:
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu23")
Same for GNU99.

When i tried strictly for C99 like this:
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic")

It worked with AutoTools.
./configure make sudo make install

But C99 did NOT work when i tried cmake.
mkdir build cmake .. make

Gave an error like this:
/home/user/qlibc/src/internal/qinternal.h:80:52: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function); did you mean ‘PTHREAD_MUTEX_RECURSIVE_NP’? 80 | pthread_mutexattr_settype(&_mutexattr, PTHREAD_MUTEX_RECURSIVE); \

fixes #115

…o install and also specifies that it needs at least GNU99 but also compiles at GNU23
README.md Outdated
sudo make install
```

Alternatively, you can use Cmake. qLibc requires at least GNU99 and confirmed to be compiling in GNU23
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect all the Linux/Linux-like users to use autotools and CMake for Windows.
Do you think we should include Windows installation instructions instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both would be good. There's always new people coming to Linux these days. For windows we could add steps both for visual studio and VScode, also maybe a cmd/powershell option.

Comment on lines 26 to 33

```bash
mkdir build
cd build
cmake ..
sudo make install
```

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take this part out for now. Not sure if this should be the officially recommended way.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just removed that section and pushed

Removed Cmake alternative build method from the installation section as it's not certain if it should be an official recommended way
Copy link
Owner

@wolkykim wolkykim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

What is the targetted C standard version?

2 participants