Comments (10)
It seems related to VS configuration, I'm using raygui to create tools with Visual Studio and it works ok.
from raygui.
I've used the out of the box scripts for raylib to generate the project templates. Could you share what configuration you're using for visual studio to bypass the warnings?
This is very easily reproducible by just trying to compile raylib in any version of VS as part of a C++ project.
from raygui.
@sduman Sorry, I closed it too quickly.
from raygui.
yep sadly unusable in c++ as far as it seems.
getting lots of warnings about { 0 } being used, Types in brackets like (Vector2) or (Rectangle).
also conversions from int to float about 30 errors.
sadly my errors are on german so wont help much to show them
id really like to use raygui!
from raygui.
also doesnt work with extern "C" { #include "raygui.h" }
from raygui.
Tested with g++
, lots of warnings but it compiles fine.
Not tested with MSVC just yet.
from raygui.
was using msvc soory shouldve pointed that out
from raygui.
With the include done like this:
#pragma warning( push, 0 )
#pragma warning( disable : 4576 )
#define RAYGUI_IMPLEMENTATION
#define RAYGUI_STANDALONE
#define RAYGUI_STATIC
#include "raygui.h"
#pragma warning( pop )
compiling using visual studio command line tools works as C code, for C++ I get these errors:
raygui.h(1193): error C2397: conversion from 'int' to 'float' requires a narrowing conversion
raygui.h(1495): error C2397: conversion from 'int' to 'float' requires a narrowing conversion
raygui.h(1496): error C2397: conversion from 'int' to 'float' requires a narrowing conversion
raygui.h(1497): error C2397: conversion from 'int' to 'float' requires a narrowing conversion
raygui.h(3971): error C2397: conversion from 'float' to 'int' requires a narrowing conversion
raygui.h(3977): error C2397: conversion from 'float' to 'int' requires a narrowing conversion
It doesn't matter to me because I am using C, but putting it here in case it helps.
from raygui.
MSVC
conversion errors are just warnings in g++
, they can probably be avoided with an explicit cast.
Warning 4576
is related to compound literals, a C99 feature apparently not supported by C++, despite it works with g++
and clang++
. Not sure if disabling 4576
it's enough to work on MSVC C++.
from raygui.
I did a pull request in which I made raygui.h compatible with C++.
In case anyone wants to use raygui.h with C++ you can look at my fork:
https://github.com/SasLuca/raygui
#44
from raygui.
Related Issues (20)
- Calling GuiLoadStyle() with enefete/sunny causes assertion fail in raylib HOT 1
- `GuiColorBarHue` bug when selecting a color HOT 5
- `GuiToggle()` always returns 0 HOT 6
- Multiple `GuiTextInputBox()` not supported HOT 2
- [`rGuiStyler`] Support for substepping font rasterization HOT 3
- examples build issue HOT 1
- `GuiButton()` not considering mouse state as exclusive mode HOT 2
- Dynamic depth management HOT 4
- Input blocking / input event consuming HOT 2
- [Feature Request] Keyboard Navigation HOT 2
- Error - cannot convert bool* to int* HOT 1
- [Feature Request] Accessibility support? HOT 5
- Problem with Installation HOT 1
- Problem when define HOT 2
- Documentation on the `rgs` format HOT 2
- Issue with Unicode input on `GuiTextBox()` HOT 1
- Compile for Rapberry Pi 2B HOT 3
- Raspberry Pi - touch does not works. HOT 3
- Define a consistent convention on controls return values
- missing .c file in src ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raygui.