SioChatDemo Socket.io Example in C++ - c++

I'm trying to get the SioChatDemo working here (https://github.com/socketio/socket.io-client-cpp). However, I'm getting this error:
sio_socket.cpp
1>c:\projects\socket.io-client-cpp\lib\websocketpp\websocketpp\common\functional.hpp(55): fatal error C1083: Cannot open include file: 'boost/bind.hpp': No such file or directory
1> sio_client.cpp
1>c:\projects\socket.io-client-cpp\lib\websocketpp\websocketpp\common\functional.hpp(55): fatal error C1083: Cannot open include file: 'boost/bind.hpp': No such file or directory
1> sio_client_impl.cpp
1>c:\projects\socket.io-client-cpp\lib\websocketpp\websocketpp\common\functional.hpp(55): fatal error C1083: Cannot open include file: 'boost/bind.hpp': No such file or directory
I've built boost so I have both a C:\boost_1_58_0 (downloaded) and a C:\boost (contains include and lib).
I added C:\boost\include to "Project Properties > Configuration Properties > C/C++ > Additional Include Directories" and C:\boost\lib to ".. > Linker > Additional Library Directories"
I checked and there's a bind.hpp here: C:\boost\include\boost-1_58\boost\bind
Why won't it load?

Related

Visual Studio Compiling Cl doesn't interpret whitespace?

I'm trying to add CL (MSVC) to my sys env and executable directories, but an error pops up that is seperating the paths by whitespace.
1>------ Build started: Project: ConsoleApplication10, Configuration: Debug x64 ------
1>Program
1>c1xx : fatal error C1083: Cannot open source file: 'C:\Program': No such file or directory
1>Microsoft
1>c1xx : fatal error C1083: Cannot open source file: 'Files\Microsoft': No such file or directory
1>Visual
1>c1xx : fatal error C1083: Cannot open source file: 'Visual': No such file or directory
1>x64
1>c1xx : fatal error C1083: Cannot open source file: 'Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\Hostx64\x64': No such file or directory
1>ConsoleApplication10.cpp
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\yvals.h(12,10): fatal error C1083: Cannot open include file: 'crtdbg.h': No such file or directory
1>Generating Code...
1>Done building project "ConsoleApplication10.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========```

How can I resolve this compile error in Visual Studio 2015?

I am trying to compile CFortranTranslator in Visual Studio 2015.
Getting the following error:
1>------ Rebuild All started: Project: CFortranTranslator, Configuration: Debug x64 ------
2>------ Rebuild All started: Project: cpptest, Configuration: Debug x64 ------
1> Process "for90.y" bison file
2> main.cpp
1>C:\Users\pc\source\repos\CFortranTranslator\src\grammar\custom_build_rules\win_flex_bison_custom_build.targets(55,5): error MSB3721: The command "
1>C:\Users\pc\source\repos\CFortranTranslator\src\grammar\custom_build_rules\win_flex_bison_custom_build.targets(55,5): error MSB3721: start /B /WAIT /D "C:\Users\pc\source\repos\CFortranTranslator\src\grammar\" win_bison.exe --output="for90.tab.cpp" --defines="for90.tab.h" "for90.y"
1>C:\Users\pc\source\repos\CFortranTranslator\src\grammar\custom_build_rules\win_flex_bison_custom_build.targets(55,5): error MSB3721: exit /b %errorlevel%" exited with code 1.
2> cpptest.vcxproj -> C:\Users\pc\source\repos\CFortranTranslator\vsbuild\x64\Debug\cpptest.exe
2> cpptest.vcxproj -> C:\Users\pc\source\repos\CFortranTranslator\vsbuild\x64\Debug\cpptest.pdb (Partial PDB)
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
the flex-bison is already in the designated directory:
So, what should I do to resolve this?
EDIT: After following Robert's instructions, the errors related to Flex/Bison are gone. Thanks to him.
But, now, I see that the application is not finding Boost, even though it is installed already.
1>------ Rebuild All started: Project: CFortranTranslator, Configuration: Debug x64 ------
1> Process "for90.y" bison file
1> Process "for90.l" flex file
1> lazygen.cpp
1> gen_variable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_vardef.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_type.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_suite.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_stmt.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_select.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_program.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_paramtable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_label.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_io.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_if.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_function.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_feature.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_exp.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_doc.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_do.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_dimenslice.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_config.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_callable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> Generating Code...
1> Compiling...
1> gen_attr_describer.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_arraybuilder.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> gen_common.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> Variable.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> tokenizer.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> parser.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> Intent.cpp
1> Function.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> attribute.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> main.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> simple_lexer.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> for90.tab.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\src\grammar\for90.tab.cpp': No such file or directory
1> getopt2.cpp
1> develop.cpp
1>c:\users\pc\source\repos\calvinneo\cfortrantranslator\src\parser\variable.h(22): fatal error C1083: Cannot open include file: 'boost/optional/optional.hpp': No such file or directory
1> forstdio.cpp
1> forlang.cpp
1> forfilesys.cpp
1> for90std.cpp
1> farray.cpp
1> Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
EDIT-2:
I resolved Boost-issue.
Now, I am having the following error:
for90.tab.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\src\grammar\for90.tab.cpp': No such file or directory
Open the file:
... \CFortranTranslator\src\grammar\custom_build_rules\win_flex_bison_custom_build.props
Go to line 16,17,18 which reads
<CommandLineTemplate>
start /B /WAIT /D "%(RootDir)%(Directory)" win_bison.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)"
exit /b %errorlevel%</CommandLineTemplate>
Replace with (only 1 line):
<CommandLineTemplate>start /B /WAIT /D "%(RootDir)%(Directory)" win_bison.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)" & exit /b %errorlevel%</CommandLineTemplate>
On (now) lines 34,35,36:
<CommandLineTemplate>
start /B /WAIT /D "%(RootDir)%(Directory)" win_flex.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)"
exit /b %errorlevel%</CommandLineTemplate>
Replace with (only 1 line):
<CommandLineTemplate>start /B /WAIT /D "%(RootDir)%(Directory)" win_flex.exe [AllOptions] [AdditionalOptions] "%(Filename)%(Extension)" & exit /b %errorlevel%</CommandLineTemplate>
Save the file and BUILD

Error C1083: How do I fix my broken Visual Studio compiler?

My Visual Studio always fails to compile any C++ program. I have not tampered or modified the compiler.
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
Gives Output:
1>Program
1>c1xx : fatal error C1083: Cannot open source file: 'C:\Program': No such file or directory
1>Files
1>c1xx : fatal error C1083: Cannot open source file: 'Files': No such file or directory
1>Microsoft
1>c1xx : fatal error C1083: Cannot open source file: '(x86)\Microsoft': No such file or directory
1>Visual
1>c1xx : fatal error C1083: Cannot open source file: 'Visual': No such file or directory
1>x64
1>c1xx : fatal error C1083: Cannot open source file: 'Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64': No such file or directory
1>test.cpp
1>Generating Code...
1>Done building project "test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I think that one of the paths is missing double quotes but I don't know where to fix this.
I suggest that you could check if the following path settings are correct.
Windows Settings->Advanced system settings->Environment Varibles->Path->Environment variable
Visual Studio Project->Properties->VC++ Directories->Include Directories
If it still doesn't work, you could reset the Environment Varibles in Tools->Import and Export Settings->Reset all settings.

CoreFoundation/CoreFoundation.h not found when build webkit on windows

When I try to build webkit on Windows 10, I got the following errors, because can not found CoreGraphics and CoreFoundation header files.
I had already installed all require programs on this page (https://webkit.org/webkit-on-windows/#installing-developer-tools), including iTunes(12.10.9.3).
Maybe it is missing Apple Application Support? but I can't found it in iTunes. Can anyone help me?
D:\Workspace\webkit\Tools\ImageDiff\cg\PlatformImageCG.cpp(29,10): fatal error C1083: 无法打开包括文件: “CoreGraphics/CGBitmapC
ontext.h”: No such file or directory [D:\Workspace\webkit\WebKitBuild\Release\Tools\ImageDiff\ImageDiffLib.vcxproj]
Assertions.cpp
CrossThreadCopier.cpp
CrossThreadTaskHandler.cpp
DateMath.cpp
FileSystem.cpp
GregorianDateTime.cpp
HexNumber.cpp
JSONValues.cpp
D:\Workspace\webkit\Source\WTF\wtf/RetainPtr.h(32,10): fatal error C1083: 无法打开包括文件: “CoreFoundation/CoreFoundation.h”:
No such file or directory (编译源文件 D:\Workspace\webkit\Source\WTF\wtf\HexNumber.cpp) [D:\Workspace\webkit\WebKitBuild\Rel
ease\Source\WTF\wtf\WTF.vcxproj]
Language.cpp
D:\Workspace\webkit\Source\WTF\wtf/RetainPtr.h(32,10): fatal error C1083: 无法打开包括文件: “CoreFoundation/CoreFoundation.h”:
No such file or directory (编译源文件 D:\Workspace\webkit\Source\WTF\wtf\Assertions.cpp) [D:\Workspace\webkit\WebKitBuild\Re
lease\Source\WTF\wtf\WTF.vcxproj]
D:\Workspace\webkit\Source\WTF\wtf/RetainPtr.h(32,10): fatal error C1083: 无法打开包括文件: “CoreFoundation/CoreFoundation.h”:
No such file or directory (编译源文件 D:\Workspace\webkit\Source\WTF\wtf\CrossThreadCopier.cpp) [D:\Workspace\webkit\WebKitB
uild\Release\Source\WTF\wtf\WTF.vcxproj]
Those header files are included in WebKitSupportLibrary.zip. Did you download WebKitSupportLibrary.zip and put it in the top source directory?

building yaml C++ giving problems

Though I copied the files from the yaml-cpp website, I am getting the following errors:
2>c:\git_sandbox\sandbox\templatematching\templatematchingframework\prj.thirdparty\yaml-cpp\src\stream.h(9): fatal error C1083: Cannot open include file: 'yaml-cpp/noncopyable.h': No such file or directory
2> scantag.cpp
2>c:\git_sandbox\sandbox\templatematching\templatematchingframework\prj.thirdparty\yaml-cpp\src\ptr_vector.h(8): fatal error C1083: Cannot open include file: 'yaml-cpp/noncopyable.h': No such file or directory
Why can't windows find these files?