Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] error: unknown type name ‘Cur’; did you mean ‘Clr’?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
zedxot
n00b
n00b


Joined: 26 Jul 2022
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Tue Jul 26, 2022 5:41 pm    Post subject: [SOLVED] error: unknown type name ‘Cur’; did you mean ‘Clr’? Reply with quote

Hello mates, It's my first day on Gentoo. Switching from Arch. First time experience with compiling everything too. So I choose
Code:
dwm-flexipatch
so that I can save patching time. But after enabling some patches when I'm running
Code:
make
it's giving me the following error:
Code:
error: unknown type name ‘Cur’; did you mean ‘Clr’?


I don't know C that much. Is there any package I need to install? Thanks in advance.
_________________
Don't talk to me about old, I walk in eternity!


Last edited by zedxot on Wed Jul 27, 2022 8:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Jul 27, 2022 3:04 pm    Post subject: Reply with quote

I would like to help you - but I don't understand what you did.

Do I understand correctly that you downloaded https://github.com/bakkeby/dwm-flexipatch?

If I unzip the source code and run 'make', I do NOT get an error message.

How can I reproduce the error? Please tell me exactly what I have to do to get the error message.
Back to top
View user's profile Send private message
zedxot
n00b
n00b


Joined: 26 Jul 2022
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Wed Jul 27, 2022 3:53 pm    Post subject: Reply with quote

mike155 wrote:
I would like to help you - but I don't understand what you did.

Do I understand correctly that you downloaded https://github.com/bakkeby/dwm-flexipatch?

If I unzip the source code and run 'make', I do NOT get an error message.

How can I reproduce the error? Please tell me exactly what I have to do to get the error message.


Here's exactly what I did.

I clone the repo by running
Code:
git clone https://github.com/bakkeby/dwm-flexipatch.git
Then I enabled some of the patches that I use in the 'patches.h' file. and run 'make'. This gave me the error message. Here's what I found afterward. I can make dwm-flexipatch if I don't enable any patches. The error message only there when there's a patch is enabled. Even only the vanitygaps patch.
_________________
Don't talk to me about old, I walk in eternity!
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Jul 27, 2022 4:24 pm    Post subject: Reply with quote

I'm sorry. I can't reproduce that error.

Please make friends with wgetpaste and post:
  1. The output of 'emerge --info'

  2. Your file 'patches.h'

  3. The full output of running 'make clean; make'
BTW:
Code:
typedef struct {
        Cursor cursor;
} Cur;

is defined in drw.h. If the compiler claims that it doesn't know 'Cur', it means that this file wasn't included. I do not see how this can happen.
Back to top
View user's profile Send private message
zedxot
n00b
n00b


Joined: 26 Jul 2022
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Wed Jul 27, 2022 7:43 pm    Post subject: Reply with quote

mike155 wrote:
I'm sorry. I can't reproduce that error.

Please make friends with wgetpaste and post:
  1. The output of 'emerge --info'

  2. Your file 'patches.h'

  3. The full output of running 'make clean; make'
BTW:
Code:
typedef struct {
        Cursor cursor;
} Cur;

is defined in drw.h. If the compiler claims that it doesn't know 'Cur', it means that this file wasn't included. I do not see how this can happen.


Thank you for helping me out.

Here is the output you requested.

'emerge --info' - http://dpaste.com/DFAAKM59B
'patches.h' - http://dpaste.com/GGGF9J2XU
'make clean; make' - http://dpaste.com/GMQ25T4BT

I'm sorry for the bad writing skill. :( [/list][/list]
_________________
Don't talk to me about old, I walk in eternity!
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Wed Jul 27, 2022 7:54 pm    Post subject: Reply with quote

zedxot wrote:
'patches.h' - http://dpaste.com/GGGF9J2XU


You changed:
Code:
define VANITYGAPS_PATCH 0

when it should be (to enable it):
Code:
#define VANITYGAPS_PATCH 1


# is not a comment in C, it is actually important

Edit: add enable text


Last edited by grknight on Wed Jul 27, 2022 7:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Jul 27, 2022 7:57 pm    Post subject: Reply with quote

Thanks for the files.

This is the error:
Code:
patches.h:1266:1: error: unknown type name ‘define’
 1266 | define VANITYGAPS_PATCH 0
      | ^~~~~~

Edit 'patches.h' and go to line 1266. Can you see it? A '#' is missing in the first column. It should be '#define', not 'define'. Look at the other #defines in the file.

After you have fixed the #define issue, the 'Cur' issue will also be fixed...
Back to top
View user's profile Send private message
zedxot
n00b
n00b


Joined: 26 Jul 2022
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Wed Jul 27, 2022 8:47 pm    Post subject: Reply with quote

grknight wrote:
zedxot wrote:
'patches.h' - http://dpaste.com/GGGF9J2XU


You changed:
Code:
define VANITYGAPS_PATCH 0

when it should be (to enable it):
Code:
#define VANITYGAPS_PATCH 1


# is not a comment in C, it is actually important

Edit: add enable text


It's solved the error. Thank you very much. :D I thought it was a comment. I feel silly.
_________________
Don't talk to me about old, I walk in eternity!
Back to top
View user's profile Send private message
zedxot
n00b
n00b


Joined: 26 Jul 2022
Posts: 58
Location: Dhaka, Bangladesh

PostPosted: Wed Jul 27, 2022 8:49 pm    Post subject: Reply with quote

mike155 wrote:
Thanks for the files.

This is the error:
Code:
patches.h:1266:1: error: unknown type name ‘define’
 1266 | define VANITYGAPS_PATCH 0
      | ^~~~~~

Edit 'patches.h' and go to line 1266. Can you see it? A '#' is missing in the first column. It should be '#define', not 'define'. Look at the other #defines in the file.

After you have fixed the #define issue, the 'Cur' issue will also be fixed...


I see it now. To enable it I need to put 1, not remove the #. I thought it was commented. Thank you.
_________________
Don't talk to me about old, I walk in eternity!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum