Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile issues #655

Closed
Stateford opened this issue Jan 11, 2018 · 4 comments
Closed

Compile issues #655

Stateford opened this issue Jan 11, 2018 · 4 comments

Comments

@Stateford
Copy link

When trying to compile I get an error. I copied and pasted the code from a previous project I have done and it doesn't work in a new project. I downloaded the latest from nuget, as well as used the casablanca files from my previous project.

It compiles just fine in my previous project, but not in the new one. Not really sure what is causing this, but I don't think I'm the only one having this issue.

All the errors point to cpprestsdk files.

1>------ Build started: Project: archive_cli, Configuration: Debug x64 ------
1>request.cpp
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\asyncrt_utils.h(491): error C4596: 'system_type_to_datetime': illegal qualified name in member declaration
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\streams.h(888): error C7510: 'int_type': use of dependent type name must be prefixed with 'typename'
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\streams.h(1121): note: see reference to class template instantiation 'Concurrency::streams::basic_istream<_CharType>' being compiled
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h(571): error C3083: '`global namespace'': the symbol to the left of a '::' must be a type
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h(969): error C3083: '`global namespace'': the symbol to the left of a '::' must be a type
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h(1198): error C3083: '`global namespace'': the symbol to the left of a '::' must be a type
1>main.cpp
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\asyncrt_utils.h(491): error C4596: 'system_type_to_datetime': illegal qualified name in member declaration
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\streams.h(888): error C7510: 'int_type': use of dependent type name must be prefixed with 'typename'
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\streams.h(1121): note: see reference to class template instantiation 'Concurrency::streams::basic_istream<_CharType>' being compiled
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h(571): error C3083: '`global namespace'': the symbol to the left of a '::' must be a type
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h(969): error C3083: '`global namespace'': the symbol to the left of a '::' must be a type
1>d:\cpp\archive_cli\packages\cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h(1198): error C3083: '`global namespace'': the symbol to the left of a '::' must be a type
1>Generating Code...
1>Done building project "archive_cli.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
@garethsb
Copy link
Contributor

Did you change the version of your compiler, without updating version of cpprestsdk perhaps?

For example, your first error is fixed by commit 31b0e47, for v2.10.0. Your second error, C7510 regarding 'int_type', is fixed by commit 05e474a, for v2.10.1.

@Stateford
Copy link
Author

I was using 2.9.1.1, I was going off the latest on nuget.

I'll download the latest and include it, but it's strange that it is working fine in another project.

@ThomasThelen
Copy link

I was using Visual Studio 2017 (which has a separate issue, see #523), and ran into this issue. I was also using the latest version posted in nuget, which does not include the fixes that garethsb-sony had mentioned above. I fixed this by using
vcpkg install cpprestsdk cpprestsdk:x64-windows instead (see readme).

Error Output:

Severity	Code	Description	Project	File	Line	Suppression State
Error (active)	E0427	qualified name is not allowed in member declaration	ConsoleApplication2	c:\Users\Data\source\repos\ConsoleApplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\asyncrt_utils.h	491	
Error	C4596	'system_type_to_datetime': illegal qualified name in member declaration	ConsoleApplication2	c:\users\data\source\repos\consoleapplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\asyncrt_utils.h	491	
Error	C7510	'int_type': use of dependent type name must be prefixed with 'typename'	ConsoleApplication2	c:\users\data\source\repos\consoleapplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\streams.h	888	
Error	C3083	'`global namespace'': the symbol to the left of a '::' must be a type	ConsoleApplication2	c:\users\data\source\repos\consoleapplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h	571	
Error	C3083	'`global namespace'': the symbol to the left of a '::' must be a type	ConsoleApplication2	c:\users\data\source\repos\consoleapplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h	969	
Error	C3083	'`global namespace'': the symbol to the left of a '::' must be a type	ConsoleApplication2	c:\users\data\source\repos\consoleapplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_msg.h	1198	
Error	C3083	'`global namespace'': the symbol to the left of a '::' must be a type	ConsoleApplication2	c:\users\data\source\repos\consoleapplication2\packages\cpprestsdk.v120.windesktop.msvcstl.dyn.rt-dyn.2.9.1\build\native\include\cpprest\http_client.h	558	

I had also reproduced this using v140.
I suppose the real issue here is nuget providing an old release.

@Stateford
Copy link
Author

There's no plans to update nuget. Check issue #672 for more information. Better to use VCPKG and point include directories to it

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

No branches or pull requests

3 participants