Page 1 of 1

Help me using ginput library in C++ Visual Studio

Posted: Sat Jan 11, 2020 7:04 pm
by cataz
Hi all :)

Thx to the wiki (https://gimx.fr/wiki/index.php?title=De ... on_Windows) I build gimx on my local machine. I was able to change functions mainly for debugging purposes to understand how gimx works. I could build and use gimx.exe successfully.

The next step for me is to use some of the gimx libraries (https://gimx.fr/wiki/index.php?title=Gasync) in a simple c++ demo program. I included GIMX\shared and SDL\include as additional include paths and set preprocessor defintions for WIN32. My source code is just what is demonstrated in ginput_test.c file.

In the visual studio editor my source looks good. However when I try to build a release I get errors from the compiler:

Code: Select all

1>c:\users\coder\git\gimx\shared\gimxcommon\test\handlers.c(25): error C2146: syntax error: missing ')' before identifier '__attribute__'
1>git\gimx\shared\gimxcommon\test\handlers.c(25): error C3646: '__attribute__': unknown override specifier
1>git\gimx\shared\gimxcommon\test\handlers.c(25): error C2059: syntax error: '('
1>git\gimx\shared\gimxcommon\test\handlers.c(25): error C2059: syntax error: ')'
1>git\gimx\shared\gimxcommon\test\handlers.c(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>git\gimx\shared\gimxcommon\test\handlers.c(27): error C2059: syntax error: ';'
1>git\gimx\shared\gimxcommon\test\handlers.c(28): error C2059: syntax error: '}'
1>gimx\shared\gimxcommon\test\handlers.c(28): error C2143: syntax error: missing ';' before '}'
1>git\gimx\shared\gimxcommon\test\handlers.c(31): error C2143: syntax error: missing ';' before '{'
For me it looks like visual studio tries to compile the gimx library as well. Why doesn't it take the gimx as a library and instead tries to compile it?
How can I build gimx so I can use it as a library for my own app?

My c++ code is avaiable here: https://pastebin.com/UFnCSs62

Please guide me :oops:

Re: Help me using ginput library in C++ Visual Studio

Posted: Sun Jan 12, 2020 10:40 am
by Matlo
Hi,

Sadly the source code is not intended to work with another compiler than GCC, and I have no intention to change this as this is a lot of work for very little benefit. The source code uses a lot of GCC's C extensions which are causing the compilation errors.

Re: Help me using ginput library in C++ Visual Studio

Posted: Sun Jan 12, 2020 12:07 pm
by cataz
I see matlo, thx for the reply! I started implementing my own solution based on gimx concepts. I can't thank you enough - gimx guides and simpliefies so many things for me.

At this stage I have some mouse movement jerkiness I'm working on. I will open a new topic if I can't solve it myself. Once again thank you so much ❤️

Re: Help me using ginput library in C++ Visual Studio

Posted: Tue May 27, 2025 3:49 pm
by Janiceailey
Très bon site de casino ! 1xbet apk Sénégal offre une expérience de jeu agréable et professionnelle. J’ai apprécié la facilité d’utilisation, les options de paiement locales et les promotions généreuses. Parfait pour les joueurs au Sénégal qui veulent un service fiable.