I am trying to build cryptopp 5.6.2 with msvc 2010. According to Readme.txt file in project's directory, if you want to compile project as a static library that contains all algorithms, you should build cryptest project. So i select this project from solutions and try to build it. But i get this message :
1>------ Build started: Project: cryptest, Configuration: Debug Win32 ------
1>Build started 12/30/2013 9:43:43 PM.
1>InitializeBuildStatus:
1> Touching "Win32\cryptest\Debug\cryptest.unsuccessfulbuild".
1>ClCompile:
1> adhoc.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'adhoc.cpp': No such file or directory
1> bench.cpp
1> bench2.cpp
1> datatest.cpp
1> dlltest.cpp
1> fipsalgt.cpp
1> regtest.cpp
1> test.cpp
1> validat1.cpp
1> validat2.cpp
1> validat3.cpp
1> Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:26.23
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
There is adhoc.cpp.PROTO in project's firectory. I change it's suffix to .cpp and try to build it again. But i get this Message :
1>------ Build started: Project: cryptest, Configuration: Debug Win32 ------
1>Build started 12/30/2013 9:51:24 PM.
1>InitializeBuildStatus:
1> Touching "Win32\cryptest\Debug\cryptest.unsuccessfulbuild".
1>ClCompile:
1> adhoc.cpp
1> bench.cpp
1> bench2.cpp
1> datatest.cpp
1> dlltest.cpp
1> fipsalgt.cpp
1> regtest.cpp
1> test.cpp
1> validat1.cpp
1> validat2.cpp
1> validat3.cpp
1> Generating Code...
1>LINK : fatal error LNK1104: cannot open file 'E:\Utality for Windows\crypto\cryptopp\Win32\Output\Debug\cryptlib.lib'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:27.22
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any solution?
So does that library exist?
E:\Utality for Windows\crypto\cryptopp\Win32\Output\Debug\cryptlib.lib
If not, then you need to build that library from the cryptopp sources (and I am sure it is more files than what your build log is showing).
Related
I'm now migrating a Qt project from another computer, both env should be Qt5.9 and Vs2015, windows8.1, msvc.
In fact, I've already passed compiling some project, so the Qt's env should be fine( I've already set Qt-vs addin tools and qt's addtional header).
But some project is showing "MSB6006: cmd.exe exited with code 2", microsoft.cppcommon.targets when I tried to build the project on new computuer using dlls.
I've traced in and vs is showing I have to deal with custombuild.
Checked verbose output of vs and found that something is different with my current qt's path:
There's fully reason to believe that something wrong with my env right now. But I haven't found them all.
path of Qt's file of addtional input and command = cl- is same with the origin computer's, but not my current path, maybe I should check some other env?
Searched for a long time on Internet. But no use. Please help or try to give some ideas how to achieve this.
1>09:49:50.555 1:2>
1>Target "CustomBuild: (TargetId:63)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets" from project "D:\MyProject\linnewTwo\SmartCheckInstrument\SmartCheckInstrument.vcxproj" (target "_BuildGenerateSourcesAction" depends on it):
1> Set Property: CustomBuildToolArchitecture=Native32Bit
1> Using "CustomBuild" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Build.CppTasks.Common.dll".
1> Task "CustomBuild" (TaskId:34)
1> Task Parameter:
1> Sources=
1> temp\moc\moc_predefs.h.cbt
1> AcceptableNonZeroExitCodes=
1> AdditionalInputs=..\..\..\..\QTINSTALL\5.9.3\5.9.3\MSVC2015\mkspecs\features\data\dummy.cpp;
1> Command=cl -Bx"D:\QtInstall\5.9.3\5.9.3\msvc2015\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E ..\..\..\..\QTINSTALL\5.9.3\5.9.3\MSVC2015\mkspecs\features\data\dummy.cpp 2>NUL >temp\moc\moc_predefs.h
1> FileType=Document
1> LinkObjects=true
1> Message=Generate moc_predefs.h
1> MinimalRebuildFromTracking=true
1> Outputs=temp\moc\moc_predefs.h;
1> TrackerLogDirectory=temp\obj\SmartChe.B419548D.tlog\
1> TreatOutputAsContent=false (TaskId:34)
1> Task Parameter:BuildSuffix=
1> :VCEnd (TaskId:34)
1> Task Parameter:TrackerLogDirectory=temp\obj\SmartChe.B419548D.tlog\ (TaskId:34)
1> Task Parameter:MinimalRebuildFromTracking=True (TaskId:34)
1> Task Parameter:TrackFileAccess=True (TaskId:34)
1> Task Parameter:ToolArchitecture=Native32Bit (TaskId:34)
1> Write Tracking Logs: (TaskId:34)
1> temp\obj\SmartChe.B419548D.tlog\custombuild.write.1.tlog (TaskId:34)
1> Read Tracking Logs: (TaskId:34)
1> temp\obj\SmartChe.B419548D.tlog\custombuild.read.1.tlog (TaskId:34)
1> No output for D:\MYPROJECT\LINNEWTWO\SMARTCHECKINSTRUMENT\TEMP\MOC\MOC_PREDEFS.H.CBT was found in the tracking log; source compilation required. (TaskId:34)
1> temp\moc\moc_predefs.h.cbt will be compiled as it was not found in the tracking log. (TaskId:34)
1> cl -Bx"D:\QtInstall\5.9.3\5.9.3\msvc2015\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E ..\..\..\..\QTINSTALL\5.9.3\5.9.3\MSVC2015\mkspecs\features\data\dummy.cpp 2>NUL >temp\moc\moc_predefs.h (TaskId:34)
1> Generate moc_predefs.h (TaskId:34)
1>09:49:50.757 1:2>
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 2.
1> Done executing task "CustomBuild" -- FAILED. (TaskId:34)
1>09:49:50.758 1:2>
new: Just checked the .sln file and found out that Qt5's path is same with previous computer, which means Qt may have written the sln file on it's own, the problem is: How am I supposed to ask Qt and vs to rewrite the sln file, so that I could change the project to a new computer safely?
Just found out the reason,there's a file called .user changing the $QDIR value while compiling, edit the value in this file, then change the path of your project in properties, check all addtional path would fix.
I'm try to build project, previously designed for MSVS 2013 C++ Compiler with Intel C++ Compiler 2015. I had created new project configuration called 'Unicode ICC Release' as a copy of standard 'Unicode Release' configuration. And after that I had changed the Platform toolset with Intel Compiler. Unfortunately, I get this error:
Error 9 error c101008c: Failed to read the manifest from the resource of file "Project.dll". The operation failed. Project\mt.exe Project
The command line of Intel linker is looks like that:
/OUT:"../../Path1/Project.dll" /MANIFEST /NXCOMPAT /PDB:"Path2\\Pdb\Project.pdb" /DYNAMICBASE /LARGEADDRESSAWARE /IMPLIB:"../Path3/Project.lib" /DEBUG /DLL /MACHINE:X86 /OPT:REF /SAFESEH /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFESTUAC:NO /ManifestFile:"Path4\Project.dll.intermediate.manifest" /OPT:ICF /NOLOGO /LIBPATH:"../Lib.Win32" /TLBID:1
And Project.dll really doesn't contain manifest!
Have any ideas how to fix this behaviour?
UPD:
MSVS linker diagnostic output:
1> Finished searching libraries
1>
1> Invoking mt.exe:
1> /verbose
1> /out:"C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{A7C6A6FD-79FB-46A7-8AF9-F8FC8729046E}.tmp"
1> /manifest
1> "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Include\Manifest\dpiaware.manifest"
1> C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{F104CF0A-974F-45E5-97C2-C71C4265AE20}.tmp
1> Microsoft (R) Manifest Tool version 6.1.7716.0
1>
1> Copyright (c) Microsoft Corporation 2009.
1>
1> All rights reserved.
1>
1>
1> Invoking rc.exe:
1> /v
1> /x
1> /fo
1> "C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{E7AC97BB-2CBB-4C34-8140-C1BA750D564E}.tmp"
1> "C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{707AEC66-9E09-4CBF-92FF-E00B822645AC}.tmp"
1> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
1>
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1> Creating C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{E7AC97BB-2CBB-4C34-8140-C1BA750D564E}.tmp
1>
1> Using codepage 1251 as default
1>
1> C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{707AEC66-9E09-4CBF-92FF-E00B822645AC}.tmp.
1> Writing 24:2, lang:0x409, size 334
1>
1> Invoking cvtres.exe:
1> /machine:x86
1> /verbose
1> /out:"C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{FEB0B0CB-A8E7-4359-BD8B-AB1996E47436}.tmp"
1> /readonly
1> "Win32\Unicode Release\Version.res"
1> "Win32\Unicode Release\Project.res"
1> "C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{E7AC97BB-2CBB-4C34-8140-C1BA750D564E}.tmp"
1> Microsoft (R) Windows Resource To Object Converter Version 12.00.21005.1
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> adding resource. type:VERSION, name:1, language:0x0000, flags:0x30, size:568
1> adding resource. type:STRING, name:7, language:0x0409, flags:0x1030, size:48
1> adding resource. type:MANIFEST, name:2, language:0x0409, flags:0x30, size:334
Intel xlink output:
1> Finished searching libraries
1>
1> Invoking cvtres.exe:
1> /machine:x86
1> /verbose
1> /out:"C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{3DBDEC74-99D1-4C46-8274-068BDB33431D}.tmp"
1> /readonly
1> "Win32\Unicode ICC Release\Version.res"
1> "Win32\Unicode ICC Release\Project.res"
1> Microsoft (R) Windows Resource To Object Converter Version 12.00.21005.1
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> adding resource. type:VERSION, name:1, language:0x0000, flags:0x30, size:568
1> adding resource. type:STRING, name:7, language:0x0409, flags:0x1030, size:48
So I opened the protobuf.sln file in Visual Studio 2012 and clicked on Build Solution (It is under release mode). The errors I get are:
7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(347,5): error MSB6003: The specified task executable "CL.exe" could not be run. The process cannot access the file 'C:\Users\Kels\protobuf-2.6.0\vsprojects\Release\cl.write.1.tlog' because it is being used by another process.
9>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 3.
8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 3.
In the instructions from google protocol buffers it says:
To avoid conflicts between the MSVC debug and release runtime
libraries, when compiling a debug build of your application, you may
need to link against a debug build of libprotobuf.lib. Similarly,
release builds should link against release libs.
Is this causing the problem? If so, how to I link against a debug build of libprotobuf.lib?
Thanks!
UPDATE
This is my output now. With errors. Still having this problem!
1>------ Rebuild All started: Project: libprotobuf, Configuration: Debug Win32 ------
2>------ Rebuild All started: Project: gtest, Configuration: Debug Win32 ------
3>------ Rebuild All started: Project: libprotobuf-lite, Configuration: Debug Win32 ------
2> gtest-all.cc
3> stringprintf.cc
1> stringprintf.cc
3> zero_copy_stream_impl_lite.cc
1> zero_copy_stream_impl_lite.cc
1> zero_copy_stream_impl.cc
3> zero_copy_stream.cc
3> wire_format_lite.cc
1> zero_copy_stream.cc
1> wire_format_lite.cc
3> repeated_field.cc
1> wire_format.cc
3> atomicops_internals_x86_msvc.cc
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1299,5): warning MSB8012: TargetPath(C:\Users\Kels\protobuf-2.6.1\gtest\msvc\protobuf/Debug\gtest.lib) does not match the Library's OutputFile property value (C:\Users\Kels\protobuf-2.6.1\gtest\msvc\protobuf\Debug\gtestd.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1301,5): warning MSB8012: TargetName(gtest) does not match the Library's OutputFile property value (gtestd). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
2> gtest.vcxproj -> C:\Users\Kels\protobuf-2.6.1\gtest\msvc\protobuf/Debug\gtest.lib
4>------ Rebuild All started: Project: gtest_main, Configuration: Debug Win32 ------
4> gtest_main.cc
1> unknown_field_set.cc
3> once.cc
1> tokenizer.cc
1> text_format.cc
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1299,5): warning MSB8012: TargetPath(C:\Users\Kels\protobuf-2.6.1\gtest\msvc\protobuf/Debug\gtest_main.lib) does not match the Library's OutputFile property value (C:\Users\Kels\protobuf-2.6.1\gtest\msvc\protobuf\Debug\gtest_maind.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1301,5): warning MSB8012: TargetName(gtest_main) does not match the Library's OutputFile property value (gtest_maind). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
3> message_lite.cc
4> gtest_main.vcxproj -> C:\Users\Kels\protobuf-2.6.1\gtest\msvc\protobuf/Debug\gtest_main.lib
3> generated_message_util.cc
1> substitute.cc
3> extension_set.cc
1> strutil.cc
3> common.cc
1> structurally_valid.cc
1> service.cc
3> coded_stream.cc
1> repeated_field.cc
3> Generating Code...
3>c:\users\kels\protobuf-2.6.1\src\google\protobuf\extension_set.cc(74): warning C4715: 'google::protobuf::internal::`anonymous namespace'::is_packable' : not all control paths return a value
1> reflection_ops.cc
3>coded_stream.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
3> Creating library Debug\libprotobuf-lite.lib and object Debug\libprotobuf-lite.exp
3> libprotobuf-lite.vcxproj -> C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\libprotobuf-lite.dll
1> printer.cc
1> parser.cc
1> atomicops_internals_x86_msvc.cc
1> once.cc
1> message_lite.cc
1> Generating Code...
1> Compiling...
1> message.cc
1> importer.cc
1> strtod.cc
1> gzip_stream.cc
1> generated_message_util.cc
1> generated_message_reflection.cc
1> extension_set_heavy.cc
1> extension_set.cc
1> dynamic_message.cc
1> descriptor_database.cc
1> descriptor.pb.cc
1> descriptor.cc
1> common.cc
1> coded_stream.cc
1> Generating Code...
1>c:\users\kels\protobuf-2.6.1\src\google\protobuf\extension_set.cc(74): warning C4715: 'google::protobuf::internal::`anonymous namespace'::is_packable' : not all control paths return a value
1>coded_stream.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
1> Creating library Debug\libprotobuf.lib and object Debug\libprotobuf.exp
1> libprotobuf.vcxproj -> C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\libprotobuf.dll
5>------ Rebuild All started: Project: libprotoc, Configuration: Debug Win32 ------
5> python_generator.cc
5> java_string_field.cc
5> java_shared_code_generator.cc
5> java_service.cc
5> java_primitive_field.cc
5> java_name_resolver.cc
5> java_message_field.cc
5> java_message.cc
5> java_lazy_message_field.cc
5> java_helpers.cc
5> java_generator_factory.cc
5> java_generator.cc
5> java_file.cc
5> java_field.cc
5> java_extension.cc
5> java_enum_field.cc
5> java_enum.cc
5> java_context.cc
5> cpp_string_field.cc
5> cpp_service.cc
5> Generating Code...
5> Compiling...
5> cpp_primitive_field.cc
5> cpp_message_field.cc
5> cpp_message.cc
5>c:\users\kels\protobuf-2.6.1\src\google\protobuf\compiler\cpp\cpp_message.cc(692): warning C4065: switch statement contains 'default' but no 'case' labels
5> cpp_helpers.cc
5> cpp_generator.cc
5> cpp_file.cc
5> cpp_field.cc
5> cpp_extension.cc
5> cpp_enum_field.cc
5> cpp_enum.cc
5> plugin.pb.cc
5> plugin.cc
5> zip_writer.cc
5> subprocess.cc
5> command_line_interface.cc
5> code_generator.cc
5> java_doc_comment.cc
5> Generating Code...
5>java_doc_comment.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
5>LINK : fatal error LNK1181: cannot open input file 'C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\libprotobuf.lib'
6>------ Rebuild All started: Project: protoc, Configuration: Debug Win32 ------
7>------ Rebuild All started: Project: test_plugin, Configuration: Debug Win32 ------
7> file.cc
6> main.cc
6>LINK : fatal error LNK1104: cannot open file 'C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\libprotobuf.lib'
8>------ Rebuild All started: Project: lite-test, Configuration: Debug Win32 ------
8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppClean.targets(75,5): warning : The process cannot access the file 'C:\USERS\KELS\PROTOBUF-2.6.1\VSPROJECTS\DEBUG\VC110.PDB' because it is being used by another process.
8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppClean.targets(75,5): warning : The process cannot access the file 'C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\vc110.idb' because it is being used by another process.
8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppClean.targets(75,5): warning : The process cannot access the file 'C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\vc110.pdb' because it is being used by another process.
7> mock_code_generator.cc
8> Generating unittest_lite.pb.{h,cc}...
8> The system cannot find the path specified.
8> Generating unittest_import_lite.pb.{h,cc}...
8> The system cannot find the path specified.
8> Generating unittest_import_public_lite.pb.{h,cc}...
8> The system cannot find the path specified.
8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 3.
7> test_plugin.cc
7> Generating Code...
7>LINK : fatal error LNK1104: cannot open file 'C:\Users\Kels\protobuf-2.6.1\vsprojects\Debug\libprotobuf.lib'
9>------ Rebuild All started: Project: tests, Configuration: Debug Win32 ------
9> Generating cpp_test_bad_identifiers.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_custom_options.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_embed_optimize_for.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_import.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_import_public.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_lite_imports_nonlite.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_mset.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_optimize_for.pb.{h,cc}...
9> The system cannot find the path specified.
9> Generating unittest_no_generic_services.pb.{h,cc}...
9> The system cannot find the path specified.
9>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code 3.
========== Rebuild All: 4 succeeded, 5 failed, 0 skipped ==========
I have a solution for a previous c++ project provided to me. When I open the solution in visual studio and try to build, I get the error:
1>------ Build started: Project: Test Proj, Configuration: Release Win32 ------
1>Build started 9/19/2011 8:28:56 PM.
1>InitializeBuildStatus:
1> Touching "Release\Test Proj.unsuccessfulbuild".
1>ClCompile:
1> example1.cpp
1>c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
1> InitShader.cpp
1>c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.85
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I had to change the input linker settings of my project to include glew32d.lib. That fixes it, and it compiles and runs properly.
However, when I alter example1.cpp(even by just adding a comment), I am no longer able to build it and I get this error:
1>------ Build started: Project: Test Proj, Configuration: Release Win32 ------
1>Build started 9/19/2011 8:25:29 PM.
1>InitializeBuildStatus:
1> Creating "Release\Test Proj.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> example1.cpp
1>c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.67
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
glew32d is still being linked so I'm not sure where I'm getting the error and why I can't build
That's not a linker error, it's a compile error.
c:\users\mycomp\downloads\stp\testp\code\Angel.h(38): fatal error C1083:...
^^^^^^^^^^^
I bet on line 38 of Angel.h, you're trying to include...
...Cannot open include file: 'GL/glew.h': No such file or directory
^^^^^^^^^^^
...and the compiler can't find the header file.
You need to make sure that the OpenGL header files (whatever folder contains a folder named GL that contains a file called glew.h) are available to the compiler; you can add this folder to the Additional Include Directories in the properties of your C++ project.
How do I use Windows Sockets 2 in Visual Studio 2008. I'm using precompiled headers, so far what I have tried is:
Included winsock2.h in my StdAfx.h file
and entered WS2_32.LIB as an additional dependency in Project Settings
I get these errors
------ Build started: Project: TestIVR, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(30) : error C2065: 'WSAEVENT' : undeclared identifier
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(30) : error C2146: syntax error : missing ';' before identifier 'socketEvent'
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(30) : error C2065: 'socketEvent' : undeclared identifier
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(35) : error C2039: 'S_addr' : is not a member of 'in_addr'
c:\program files\microsoft sdks\windows\v6.0a\include\inaddr.h(22) : see declaration of 'in_addr'
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(40) : error C2065: 'socketEvent' : undeclared identifier
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(40) : error C3861: 'WSAEventSelect': identifier not found
Build log was saved at "file://c:\Documents and Settings\Hussain\My Documents\Visual Studio 2008\Projects\TestIVR\TestIVR\Debug\BuildLog.htm"
TestIVR - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
By the way, if I include the winsock2.h in my main.cpp (where my main() function resides) then I get different errors
------ Build started: Project: TestIVR, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\hussain\my documents\visual studio 2008\projects\testivr\testivr\main.cpp(36) : error C2039: 'S_addr' : is not a member of 'in_addr'
c:\program files\microsoft sdks\windows\v6.0a\include\inaddr.h(22) : see declaration of 'in_addr'
Build log was saved at "file://c:\Documents and Settings\Hussain\My Documents\Visual Studio 2008\Projects\TestIVR\TestIVR\Debug\BuildLog.htm"
TestIVR - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Following is the content for my StdAfx.h header file
#pragma once
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include <winsock2.h>
Well your in_addr issue is caused byt he fact there IS no S_addr field in in_addr. There is an in_addr.s_addr which re-directs to in_addr.S_un.S_addr.
From memory I think windows.h includes the winsock.h (i.e. sockets v1), which conflicts with winsock2.h. You can prevent this by defining WIN32_LEAN_AND_MEAN :
#include <stdio.h>
#include <tchar.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
You need to include winsock2.h before windows.h
Try browsing
http://www.sockets.com/ for examples