Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Using VisualStudio as a main IDE (Compilation errors)
Using VisualStudio as a main IDE [message #51271] Tue, 26 February 2019 20:14 Go to next message
Lucas is currently offline  Lucas
Messages: 6
Registered: February 2019
Location: UK
Promising Member
Hi.
First of all I would like to introduce myself here on this forum.
My Name is Lucas and I am really grateful I can join this community and be able to use UPP. I have found this library by an accident when I decided I will not download absolutely MASSIVE (like 30GB or so) Qt dev kit, just to make some GUI. I saw yours examples and I fell in love with this simplicity, quickness of using, compilation times, lack of shenanigans like in case of MOC in Qt. Basically UPP became my "weapon of choice" to everything that I do that requires GUI.

The problem that I would like to write here about is that I need to use VisualStudio IDE. I have no problem using TheIDE especially the fantastic layout designer, but I am in process of learning VisualStudio as a part of preparing for a new job role. I am rather yet a beginner programmer and I have found a lot of difficulties in not only compiling whole library in VisualStudio but even using it.

Are there any compiler options that I have to use to make it works? I am getting lots of ambiguity errors (mainly json.h). When I am using TheIde code compiles with no problem using the same compiler. However when I try to manually include json.h I get the same errors in the IDE. My guess is that I have to define some macros for conditional compilation.

I will be really grateful for any help.
Re: Using VisualStudio as a main IDE [message #51274 is a reply to message #51271] Thu, 28 February 2019 11:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14162
Registered: November 2005
Ultimate Member
Lucas wrote on Tue, 26 February 2019 20:14
Hi.
First of all I would like to introduce myself here on this forum.
My Name is Lucas and I am really grateful I can join this community and be able to use UPP. I have found this library by an accident when I decided I will not download absolutely MASSIVE (like 30GB or so) Qt dev kit, just to make some GUI. I saw yours examples and I fell in love with this simplicity, quickness of using, compilation times, lack of shenanigans like in case of MOC in Qt. Basically UPP became my "weapon of choice" to everything that I do that requires GUI.

The problem that I would like to write here about is that I need to use VisualStudio IDE. I have no problem using TheIDE especially the fantastic layout designer, but I am in process of learning VisualStudio as a part of preparing for a new job role. I am rather yet a beginner programmer and I have found a lot of difficulties in not only compiling whole library in VisualStudio but even using it.

Are there any compiler options that I have to use to make it works? I am getting lots of ambiguity errors (mainly json.h). When I am using TheIde code compiles with no problem using the same compiler. However when I try to manually include json.h I get the same errors in the IDE. My guess is that I have to define some macros for conditional compilation.

I will be really grateful for any help.


Posting some of these errors plus your sources would be really helpful... Smile

Mirek
Re: Using VisualStudio as a main IDE [message #51278 is a reply to message #51274] Thu, 28 February 2019 19:49 Go to previous messageGo to next message
Lucas is currently offline  Lucas
Messages: 6
Registered: February 2019
Location: UK
Promising Member
Stupid me.

That is what VS gives me:
Severity Code Description Project File Line Suppression State
Error C2445 result type of conditional expression is ambiguous: types 'const char [5]' and 'Upp::String' can be converted to multiple common types Editor c:\users\canis\dropbox\cpp\editor\editor\core\json.h 5
Error C2445 result type of conditional expression is ambiguous: types 'const char [5]' and 'Upp::String' can be converted to multiple common types Editor c:\users\canis\dropbox\cpp\editor\editor\core\json.h 4

and these I get when I explicitly include json.h in TheIde:
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (40): error C2872: 'JsonArray': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (16): note: could be 'JsonArray'
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (56): note: or 'Upp::JsonArray'
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (53): error C2872: 'JsonArray': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (30): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (30): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (31): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (31): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (32): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (32): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (33): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (33): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (34): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (34): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (35): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (35): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (36): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (36): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (37): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (37): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (38): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (38): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (43): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (43): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (44): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (44): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (45): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (45): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (46): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (46): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (47): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (47): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (48): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (48): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (49): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (49): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (50): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (50): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (51): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (51): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (77): error C2872: 'Json': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (68): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (69): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (70): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (71): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (72): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (73): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (74): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (75): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (76): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (83): error C2872: 'Json': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (83): error C2872: 'JsonArray': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (115): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (121): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (194): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (195): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (196): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (197): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (198): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (199): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (200): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (201): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (202): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (205): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (228): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (257): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (284): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (314): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (320): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (326): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (347): error C2872: 'JsonIO': ambiguous symbol
Re: Using VisualStudio as a main IDE [message #51281 is a reply to message #51278] Fri, 01 March 2019 10:23 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14162
Registered: November 2005
Ultimate Member
Lucas wrote on Thu, 28 February 2019 19:49
Stupid me.

That is what VS gives me:
Severity Code Description Project File Line Suppression State
Error C2445 result type of conditional expression is ambiguous: types 'const char [5]' and 'Upp::String' can be converted to multiple common types Editor c:\users\canis\dropbox\cpp\editor\editor\core\json.h 5
Error C2445 result type of conditional expression is ambiguous: types 'const char [5]' and 'Upp::String' can be converted to multiple common types Editor c:\users\canis\dropbox\cpp\editor\editor\core\json.h 4

and these I get when I explicitly include json.h in TheIde:
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (40): error C2872: 'JsonArray': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (16): note: could be 'JsonArray'
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (56): note: or 'Upp::JsonArray'
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (53): error C2872: 'JsonArray': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (30): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (30): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (31): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (31): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (32): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (32): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (33): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (33): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (34): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (34): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (35): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (35): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (36): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (36): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (37): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (37): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (38): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (38): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (43): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (43): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (44): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (44): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (45): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (45): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (46): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (46): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (47): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (47): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (48): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (48): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (49): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (49): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (50): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (50): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (51): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (51): error C2660: 'Json::CatRaw': function does not take 1 arguments
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (77): error C2872: 'Json': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (68): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (69): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (70): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (71): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (72): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (73): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (74): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (75): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (76): error C2668: 'AsJSON': ambiguous call to overloaded function
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (83): error C2872: 'Json': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (83): error C2872: 'JsonArray': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (115): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (121): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (194): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (195): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (196): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (197): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (198): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (199): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (200): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (201): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (202): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (205): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (228): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (257): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (284): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (314): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (320): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (326): error C2872: 'JsonIO': ambiguous symbol
C:\Users\canis\Dropbox\cpp\upp/uppsrc\core/json.h (347): error C2872: 'JsonIO': ambiguous symbol


Well, posting code would be nice too, but my first guess is that you #include "json.h" individually.

You are supposed to #include <Core/Core.h>

Mirek
Re: Using VisualStudio as a main IDE [message #51333 is a reply to message #51281] Sun, 10 March 2019 20:51 Go to previous messageGo to next message
Lucas is currently offline  Lucas
Messages: 6
Registered: February 2019
Location: UK
Promising Member
So ok. I started again from the beginning.
I created empty CtrLib application with main window in TheIDE compiled it and it worked perfectly well.
I saved all files and then in VS I created new solution and used this files. In project properties I added Include directory to point it to UPP header files.
Now the error I get is:

Severity Code Description Project File Line Suppression State
Error C2100 illegal indirection HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2672 'Upp::AssertMoveablePtr': no matching overloaded function found HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2782 'void Upp::AssertMoveablePtr(T,T)': template parameter 'T' is ambiguous HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157

And there is comment in source file:
// COMPILATION ERROR HERE MEANS TYPE T WAS NOT MARKED AS Moveable

How can I mark it as movable?

Than for all your help.
Re: Using VisualStudio as a main IDE [message #51337 is a reply to message #51333] Mon, 11 March 2019 13:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14162
Registered: November 2005
Ultimate Member
Lucas wrote on Sun, 10 March 2019 20:51
So ok. I started again from the beginning.
I created empty CtrLib application with main window in TheIDE compiled it and it worked perfectly well.
I saved all files and then in VS I created new solution and used this files. In project properties I added Include directory to point it to UPP header files.
Now the error I get is:

Severity Code Description Project File Line Suppression State
Error C2100 illegal indirection HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2672 'Upp::AssertMoveablePtr': no matching overloaded function found HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2782 'void Upp::AssertMoveablePtr(T,T)': template parameter 'T' is ambiguous HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157
Error C2784 'void Upp::AssertMoveablePtr(T,T)': could not deduce template argument for 'T' from 'T' HW c:\users\canis\dropbox\cpp\upp\uppsrc\core\topt.h 157

And there is comment in source file:
// COMPILATION ERROR HERE MEANS TYPE T WAS NOT MARKED AS Moveable

How can I mark it as movable?

Than for all your help.


Too little info. Can you .zip it and send?

(That said, nobody at this moment is using U++ with Visual Studio. It should be theoretically possible though, it is just C++ after all....)

Mirek
Re: Using VisualStudio as a main IDE [message #51338 is a reply to message #51271] Mon, 11 March 2019 15:04 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
I haven't seen VS for long time, but unless they removed it completely, it's maybe possible to use `umk` as project build tool.

Although that doesn't itself make the project management easier, depends, what you need and how you update your project, not sure if with umk you would have to manually keep ".upp" project file up to date, or it would be possible to extract that from VS project data.

Another option is as usually, go to TheIDE, switch "verbose output" ON, do the full rebuild, store the logs and then do the verbose builds in VS and look for differences.
Re: Using VisualStudio as a main IDE [message #51350 is a reply to message #51338] Wed, 13 March 2019 19:05 Go to previous message
Lucas is currently offline  Lucas
Messages: 6
Registered: February 2019
Location: UK
Promising Member
I've set the compiler to use c++17 and last errors are gone but I got some new ones.
so it looks like this right now:


1>------ Build started: Project: HW, Configuration: Release x64 ------
1>main.cpp
1>c:\users\canis\dropbox\cpp\upp\uppsrc\core\json.h(4): error C2445: result type of conditional expression is ambiguous: types 'const char [5]' and 'Upp::String' can be converted to multiple common types
1>c:\users\canis\dropbox\cpp\upp\uppsrc\core\json.h(4): note: could be 'const char *'
1>c:\users\canis\dropbox\cpp\upp\uppsrc\core\json.h(4): note: or 'Upp::String'
1>c:\users\canis\dropbox\cpp\upp\uppsrc\core\json.h(5): error C2445: result type of conditional expression is ambiguous: types 'const char [5]' and 'Upp::String' can be converted to multiple common types
1>c:\users\canis\dropbox\cpp\upp\uppsrc\core\json.h(5): note: could be 'const char *'
1>c:\users\canis\dropbox\cpp\upp\uppsrc\core\json.h(5): note: or 'Upp::String'
1>Done building project "HW.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


And this is my project in zip file: https://www.dropbox.com/s/c25kyrfox9u1rd1/HW.zip?dl=0
Previous Topic: how can I draw on the top of a dockwindow?
Next Topic: RegExp::ReplaceGlobal() is buggy
Goto Forum:
  


Current Time: Fri Dec 13 23:40:06 CET 2024

Total time taken to generate the page: 0.02205 seconds