Related
I am trying to install gnutls 3.7.8 on an Ubuntu 20.04.5 server. Had to install nettle first.
Command I am running for configure:
PKG_CONFIG_PATH="/usr/lib/pkgconfig/:$PKG_CONFIG_PATH" ./configure --prefix=/usr --with-included-unistring --with-included-libtasn1
Running "make --debug=j", this is where things start to go sideways; everything is running smoothly until then:
Making all in nettle
make\[4\]: Entering directory '/home/meowmeow/Installed_Programs/gnutls-3.7.8/lib/nettle'
Putting child 0x56123e85f740 (mac.lo) PID 1065461 on the chain.
Live child 0x56123e85f740 (mac.lo) PID 1065461
CC mac.lo
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:48: warning: "streebog256_init" redefined
48 | #define streebog256_init \_gnutls_streebog256_init
|
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:44: note: this is the location of the previous definition
44 | #define streebog256_init nettle_streebog256_init
|
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:49: warning: "streebog256_digest" redefined
49 | #define streebog256_digest \_gnutls_streebog256_digest
|
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:45: note: this is the location of the previous definition
45 | #define streebog256_digest nettle_streebog256_digest
|
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:50: warning: "streebog512_init" redefined
50 | #define streebog512_init \_gnutls_streebog512_init
|
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:46: note: this is the location of the previous definition
46 | #define streebog512_init nettle_streebog512_init
|
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:51: warning: "streebog512_update" redefined
51 | #define streebog512_update \_gnutls_streebog512_update
|
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:47: note: this is the location of the previous definition
47 | #define streebog512_update nettle_streebog512_update
|
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:52: warning: "streebog512_digest" redefined
52 | #define streebog512_digest \_gnutls_streebog512_digest
|
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:48: note: this is the location of the previous definition
48 | #define streebog512_digest nettle_streebog512_digest
|
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:62:8: error: redefinition of 'struct streebog512_ctx'
62 | struct streebog512_ctx
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:58:8: note: originally defined here
58 | struct streebog512_ctx
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~
In file included from gost/hmac-gost.h:42,
from mac.c:39:
gost/streebog.h:92: warning: "streebog256_update" redefined
92 | #define streebog256_update \_gnutls_streebog512_update
|
In file included from /usr/include/nettle/hmac.h:44,
from mac.c:33:
/usr/include/nettle/streebog.h:88: note: this is the location of the previous definition
88 | #define streebog256_update nettle_streebog512_update
|
In file included from mac.c:39:
gost/hmac-gost.h:51: warning: "hmac_streebog256_set_key" redefined
51 | #define hmac_streebog256_set_key \_gnutls_hmac_streebog256_set_key
|
In file included from mac.c:33:
/usr/include/nettle/hmac.h:80: note: this is the location of the previous definition
80 | #define hmac_streebog256_set_key nettle_hmac_streebog256_set_key
|
In file included from mac.c:39:
gost/hmac-gost.h:52: warning: "hmac_streebog256_digest" redefined
52 | #define hmac_streebog256_digest \_gnutls_hmac_streebog256_digest
|
In file included from mac.c:33:
/usr/include/nettle/hmac.h:81: note: this is the location of the previous definition
81 | #define hmac_streebog256_digest nettle_hmac_streebog256_digest
|
In file included from mac.c:39:
gost/hmac-gost.h:53: warning: "hmac_streebog512_set_key" redefined
53 | #define hmac_streebog512_set_key \_gnutls_hmac_streebog512_set_key
|
In file included from mac.c:33:
/usr/include/nettle/hmac.h:82: note: this is the location of the previous definition
82 | #define hmac_streebog512_set_key nettle_hmac_streebog512_set_key
|
In file included from mac.c:39:
gost/hmac-gost.h:54: warning: "hmac_streebog512_update" redefined
54 | #define hmac_streebog512_update \_gnutls_hmac_streebog512_update
|
In file included from mac.c:33:
/usr/include/nettle/hmac.h:83: note: this is the location of the previous definition
83 | #define hmac_streebog512_update nettle_hmac_streebog512_update
|
In file included from mac.c:39:
gost/hmac-gost.h:55: warning: "hmac_streebog512_digest" redefined
55 | #define hmac_streebog512_digest \_gnutls_hmac_streebog512_digest
|
In file included from mac.c:33:
/usr/include/nettle/hmac.h:84: note: this is the location of the previous definition
84 | #define hmac_streebog512_digest nettle_hmac_streebog512_digest
|
In file included from mac.c:39:
gost/hmac-gost.h:60:8: error: redefinition of 'struct hmac_streebog512_ctx'
60 | struct hmac_streebog512_ctx HMAC_CTX(struct streebog512_ctx);
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
In file included from mac.c:33:
/usr/include/nettle/hmac.h:254:8: note: originally defined here
254 | struct hmac_streebog512_ctx HMAC_CTX(struct streebog512_ctx);
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
Reaping losing child 0x56123e85f740 PID 1065461
make\[4\]: \*\*\* \[Makefile:2346: mac.lo\] Error 1
Removing child 0x56123e85f740 PID 1065461 from chain.
make\[4\]: Leaving directory '/home/meowmeow/Installed_Programs/gnutls-3.7.8/lib/nettle'
Reaping losing child 0x562065819fa0 PID 1065420
make\[3\]: \*\*\* \[Makefile:2901: all-recursive\] Error 1
Removing child 0x562065819fa0 PID 1065420 from chain.
make\[3\]: Leaving directory '/home/meowmeow/Installed_Programs/gnutls-3.7.8/lib'
Reaping losing child 0x557239209220 PID 1065419
make\[2\]: \*\*\* \[Makefile:2505: all\] Error 2
Removing child 0x557239209220 PID 1065419 from chain.
make\[2\]: Leaving directory '/home/meowmeow/Installed_Programs/gnutls-3.7.8/lib'
Reaping losing child 0x563a8ddd7ab0 PID 1065402
make\[1\]: \*\*\* \[Makefile:2257: all-recursive\] Error 1
Removing child 0x563a8ddd7ab0 PID 1065402 from chain.
make\[1\]: Leaving directory '/home/meowmeow/Installed_Programs/gnutls-3.7.8'
Reaping losing child 0x55f76896c820 PID 1065391
make: \*\*\* \[Makefile:2182: all\] Error 2
Removing child 0x55f76896c820 PID 1065391 from chain.
I am a biologist, I just want to be able to run remote blast on my server and am basically a monkey typing commands when it comes to compiling things - so at this point, I'm pretty much out of knowledge.
I have tried to reinstall nettle many times using different options; have tried searching through the Makefile trying to find what is happening here; have tried multiple configurations of ./configure for gnutls, googled this every which way. I was expecting...to install gnutls.
I am trying to read 2 integers from a file and write their sum to another file. On running the following code in release mode (Visual Studio 2017 Community)
// Kickstart.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
#include<fstream>
#include<string>
int main()
{
using namespace std;
string inpath = "E:\\Pratik\\Kickstart\\Inputs\\Sum.txt";
string outpath = "E:\\Pratik\\Kickstart\\Outputs\\Sum.txt";
ifstream fin;
ofstream fout;
fin.open(inpath);
fout.open(outpath);
if (!fin)
{
cerr << "Unable to open input file";
exit(1);
}
if (!fout)
{
cerr << "Unable to open output file";
exit(1);
}
int sum = 0;
int a, b;
fin >> a >> b;
cout << "a: " << a << "b: " << b << endl; //Line in question
fout << a + b;
fin.close();
fout.close();
system("pause");
return 0;
}
I get this error on running it in Release mode (x64, Local Windows Debugger)
1>------ Build started: Project: Kickstart, Configuration: Release x64 ------
1>Kickstart.cpp
1>Generating code
1>LINK : fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 258)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1> link!InvokeCompilerPass()+0x1f1b9
1> link!InvokeCompilerPass()+0x1f1b9
1> link!InvokeCompilerPass()+0x1ebd3
1> link!DllGetC2Telemetry()+0x10769b
1>
1>LINK : fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 258)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1>Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
1> link!InvokeCompilerPass()+0x1f1b9
1> link!InvokeCompilerPass()+0x1ebd3
1> link!DllGetC2Telemetry()+0x10769b
1>
1>
1>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
1>
1> Version 14.12.25831.0
1>
1> ExceptionCode = C0000005
1> ExceptionFlags = 00000000
1> ExceptionAddress = 063636E6 (05F30000) "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\c2.dll"
1> NumberParameters = 00000002
1> ExceptionInformation[ 0] = 00000000
1> ExceptionInformation[ 1] = 0FA6D358
1>
1>CONTEXT:
1> Eax = 0FA6D358 Esp = 008FE9E8
1> Ebx = 05A500EC Ebp = 008FEA18
1> Ecx = 00000005 Esi = 0FA6D358
1> Edx = 08C8C02C Edi = 008FE9F8
1> Eip = 063636E6 EFlags = 00010202
1> SegCs = 00000023 SegDs = 0000002B
1> SegSs = 0000002B SegEs = 0000002B
1> SegFs = 00000053 SegGs = 0000002B
1> Dr0 = 00000000 Dr3 = 00000000
1> Dr1 = 00000000 Dr6 = 00000000
1> Dr2 = 00000000 Dr7 = 00000000
1>Done building project "Kickstart.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
On tinkering with the code, I discovered that commenting out the cout line (has a "Line in question" comment) makes the code run properly. My initial suspicion was that since the 2 variables are written to stdout stream, they cannot be written to ofstream. However, when I comment out the "fout"<<"a"<<"b" line (next to "Line in question"), I get the same error. This means the variables just refuse to be loaded in stdout stream (Am I right?). I am not able to figure out why is this happening. A google search for "writing variables to multiple streams in C++" was not helpful either.
Now, when I select Debug mode in Visual Studio and apply a breakpoint (at string inpath declaration and assignment) and step through the code (no code is commented. The code given above is stepped through as it is), it runs successfully. It prints the values of a and b on stdout (console screen) and the sum is also written in the output file.
So there are 2 things happening here:
1 - In Release mode, the variables can be written only to ofstream but not on console screen.
2 - In Debug mode, the code behaves exactly the way I want.
Note - The content in my input file is 2 numbers (5 and 9) separated by a space. I am running Visual Studio 2017 community on Windows 10
Can someone please explain what exactly is happening here? Thanks!
I'm using the SaveFileDialog class example
to combine use create a text file in a user defined directory.
Here's the conflicting part of my code:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
array<Image^> ^imageArray ;
int CurrentImage=0;
imageArray = gcnew array<Image^>(9);
array<String^>^ names = {L"adc1.bmp" ,"adc2.bmp","adc3.bmp","adc4.bmp","adc5.bmp","adc6.bmp","adc7.bmp","adc8.bmp"};
for(int i=0; i<8; i++)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
imageArray[i] =(cli::safe_cast<System::Drawing::Bitmap^>(resources->GetObject(names[i])));
}
if((this->comboBox4->Text == String::Empty)||(this->textBox2->Text == String::Empty)){
this->textBox1->Text="please select port and save file directory";
}
else{ // start assigning
try{ // first make sure port isn't busy/open
if(!this->serialPort1->IsOpen){
// select the port whose name is in comboBox4 (select port)
this->serialPort1->PortName=this->comboBox4->Text;
//open the port
this->serialPort1->Open();
// sending
String^ name_ = this->serialPort1->PortName;
String^ START;
int m=0;
//send data to setup timer on the microcontroller
this->serialPort1->WriteLine(START);
Stream^ myStream;
SaveFileDialog^ saveFileDialog1 = gcnew SaveFileDialog;
saveFileDialog1->Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
saveFileDialog1->FilterIndex = 2;
saveFileDialog1->RestoreDirectory = true;
if ( saveFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK )
{
if ( (myStream = saveFileDialog1->OpenFile()) != nullptr )
{
// receiving
myStream<<"ADC1;ADC2;ADC3;ADC4;ADC5;ADC6;ADC7;ADC8"<<endl;
while(START){
myStream<<this->serialPort1->ReadLine()<<";";
pictureBox1->image=imagearray[m];
m++;
if(m==7){
myStream<<endl;
m=0;
}
}
}}}
else{
this->textBox1->Text="Warning: port is busy or isn't open";
}
}
catch(UnauthorizedAccessException^){
this->textBox1->Text="Unauthorized access";
}
}
}
However, I'm getting the following errors:
1>------ Build started: Project: Data_Logger, Configuration: Debug Win32 ------
1> Data_Logger.cpp
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(1085) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &&' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(968) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(958) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(951) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(944) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(937) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(898) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(851) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(811) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(764) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(726) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(679) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(301): error C2676: binary '<<' : 'System::IO::Stream ^' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(1085) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &&' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(968) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(958) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(951) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(944) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(937) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(898) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(851) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(811) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(764) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(726) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(679) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(304): error C2676: binary '<<' : 'System::IO::Stream ^' does not define this operator or a conversion to a type acceptable to the predefined operator
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(305): error C2039: 'image' : is not a member of 'System::Windows::Forms::PictureBox'
1> c:\program files\reference assemblies\microsoft\framework\.netframework\v4.0\system.windows.forms.dll : see declaration of 'System::Windows::Forms::PictureBox'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(305): error C2065: 'imagearray' : undeclared identifier
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(1085) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &&' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(968) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(958) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(951) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(944) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(937) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(898) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(851) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(811) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)' : could not deduce template argument for 'std::basic_ostream<char,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(764) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(726) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)' : could not deduce template argument for 'std::basic_ostream<_Elem,_Traits> &' from 'System::IO::Stream ^'
1> C:\Program Files\Microsoft Visual Studio 10.0\VC\include\ostream(679) : see declaration of 'std::operator <<'
1>c:\documents and settings\310098394\desktop\programming\visual c++\data_logger\data_logger\Form1.h(308): error C2676: binary '<<' : 'System::IO::Stream ^' does not define this operator or a conversion to a type acceptable to the predefined operator
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The error starts at line: myStream<<"ADC1;ADC2;ADC3;ADC4;ADC5;ADC6;ADC7;ADC8"<<endl;
I used ofstream before and it worked. However, I would like the user to select the directory and name the output file and I'm not sure if that would be possible using ofstream. I would really appreciate it, if someone could help me solve at the least the error related to myStream.
Thanks in advance
System::IO::Stream doesn't support operator<< and operator>> like std::[i|o|io]stream. To write to a System::IO::Stream, use the Stream::Write method.
Check out the documentation for System::IO::Stream:
http://msdn.microsoft.com/en-us/library/system.io.stream.aspx
I am trying to install gnuplot4.6.tar.gz on a fedora2 machine. I am doing the following:
tar -xvzf gnuplot4.6.tar.gz
cd gnuplot 4.6.0
./configure
make
make install
However, running 'make' gives the following error:
./term/gd.trm:717: undefined reference to gdFontGetTiny'
term.o(.text+0x200a7):../term/gd.trm:724: undefined reference togdFontGetSmall '
term.o(.text+0x200ae):../term/gd.trm:731: undefined reference to gdFontGetMediu mBold'
term.o(.text+0x200b5):../term/gd.trm:738: undefined reference togdFontGetLarge '
term.o(.text+0x200bc):../term/gd.trm:745: undefined reference to gdFontGetGiant '
term.o(.text+0x21fca): In functionPNG_set_font':
../term/gd.trm:1840: undefined reference to gdFontGetTiny'
term.o(.text+0x21fd9):../term/gd.trm:1838: undefined reference togdFontGetGian t'
term.o(.text+0x21fe0):../term/gd.trm:1836: undefined reference to gdFontGetLarg e'
term.o(.text+0x21fe7):../term/gd.trm:1834: undefined reference togdFontGetMedi umBold'
term.o(.text+0x21fee):../term/gd.trm:1832: undefined reference to gdFontGetSmal l'
collect2: ld returned 1 exit status
make[3]: *** [gnuplot] Error 1
make[3]: Leaving directory/home/sayantika/gnuplot/gnuplot-4.6.0/src'
make[2]: * [all-recursive] Error 1
make[2]: Leaving directory /home/sayantika/gnuplot/gnuplot-4.6.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory/home/sayantika/gnuplot/gnuplot-4.6.0'
make: * [all] Error 2
Currently, the machine has gnuplot 3.7
Has it anything to do with the architecture of the machine?
cat /proc/cpuinfo gives the following output:
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Celeron(R) CPU 2.00GHz
stepping : 7
cpu MHz : 1999.412
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
bogomips : 3956.73
I commented the following lines in src/term.h. This solved the problem and gnuplot 4.6 got installed.
#if defined(HAVE_GD_PNG) || defined(HAVE_GD_JPEG) || defined(HAVE_GD_GIF)
#include "gd.trm"
#endif
I'm compiling on VC++ 2010. The following code is for a homework assignment:
#include <iostream>
#include <map>
#include "PaintJobEst.h"
using namespace std;
int main( void )
{
map< string, double > data;
double numRooms = 0, costPerGallon = 0, sqrFtWallSpace = 0;
cout << "How many rooms wil you be painting today? " << endl;
cin >> numRooms;
const bool numRoomsAtLeastOne = ( numRooms >= 1 );
if ( !numRoomsAtLeastOne )
{
cout << "INVALID ENTRY: Please enter a value greater than or equal to 1 for the amount of rooms you wish to paint" << endl;
main();
}
cout << "What is the cost of paint per gallon? " << endl;
cin >> costPerGallon;
const bool costCheck = ( costPerGallon >= 10.00 );
if ( !costCheck )
{
cout << "INVALID ENTRY: Please enter a value greater than or equal to 10.00 for the cost-per-gallon of paint you wish to use." << endl;
main();
}
cout << "What is the square feet of wallspace per gallon of paint you wish to cover? " << endl;
cin >> sqrFtWallSpace;
const bool sqrFeetCheck = ( sqrFtWallSpace >= 0 );
if ( !sqrFeetCheck )
{
cout << "INVALID ENTRY: Please enter a value which is NON-NEGATIVE for covering the square feet of wallspace per gallon" << endl;
main();
}
data.insert( pair< string, double >( "numRooms", numRooms ) );
data.insert( pair< string, double >( "costPerGallon", costPerGallon ) );
data.insert( pair< string, double >( "sqrFtWallSpace", sqrFtWallSpace ) );
Estimate( data );
system("pause");
}
Yet, when I compile it, I get flooded with strange errors which are related to how the xfunctional file. Why this is happening, I have no idea. Am I missing an include file somewhere?
Errors
>------ Build started: Project: Project17, Configuration: Debug Win32 ------
1> main.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(124) : while compiling class template member function 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const'
1> with
1> [
1> _Ty=std::string
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\map(71) : see reference to class template instantiation 'std::less<_Ty>' being compiled
1> with
1> [
1> _Ty=std::string
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(451) : see reference to class template instantiation 'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=double,
1> _Pr=std::less<std::string>,
1> _Alloc=std::allocator<std::pair<const std::string,double>>,
1> _Mfl=false
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(520) : see reference to class template instantiation 'std::_Tree_nod<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<std::string,double,std::less<std::string>,std::allocator<std::pair<const std::string,double>>,false>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(659) : see reference to class template instantiation 'std::_Tree_val<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<std::string,double,std::less<std::string>,std::allocator<std::pair<const std::string,double>>,false>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\map(81) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<std::string,double,std::less<std::string>,std::allocator<std::pair<const std::string,double>>,false>
1> ]
1> c:\users\holland\documents\code\projects\studying\chapter6\project17\project17\main.cpp(13) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=double
1> ]
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\memory(2582) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\memory(2582) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\memory(2582) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(1356) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(1356) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(1356) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(1179) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(1179) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility(1179) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility(318) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility(318) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility(318) : see declaration of 'std::operator <'
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2676: binary '<' : 'const std::string' does not define this operator or a conversion to a type acceptable to the predefined operator
1> PaintJobEst.cpp
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xfunctional(124) : while compiling class template member function 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const'
1> with
1> [
1> _Ty=std::string
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\map(71) : see reference to class template instantiation 'std::less<_Ty>' being compiled
1> with
1> [
1> _Ty=std::string
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(451) : see reference to class template instantiation 'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=double,
1> _Pr=std::less<std::string>,
1> _Alloc=std::allocator<std::pair<const std::string,double>>,
1> _Mfl=false
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(520) : see reference to class template instantiation 'std::_Tree_nod<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<std::string,double,std::less<std::string>,std::allocator<std::pair<const std::string,double>>,false>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree(659) : see reference to class template instantiation 'std::_Tree_val<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<std::string,double,std::less<std::string>,std::allocator<std::pair<const std::string,double>>,false>
1> ]
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\map(81) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
1> with
1> [
1> _Traits=std::_Tmap_traits<std::string,double,std::less<std::string>,std::allocator<std::pair<const std::string,double>>,false>
1> ]
1> c:\users\holland\documents\code\projects\studying\chapter6\project17\project17\paintjobest.cpp(9) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=double
1> ]
Add #include <string> and the problem goes away for me on VC++ 2010.