|
------ Build started: Project: Project4a, Configuration: Debug Win32 ------
Compiling...
Impl.cpp
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(112) : error C2011: 'fd_set' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(54) : see declaration of 'fd_set'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(147) : warning C4005: 'FD_SET' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(88) : see previous definition of 'FD_SET'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(156) : error C2011: 'timeval' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(97) : see declaration of 'timeval'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(212) : error C2011: 'hostent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(153) : see declaration of 'hostent'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(225) : error C2011: 'netent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(166) : see declaration of 'netent'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(232) : error C2011: 'servent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(173) : see declaration of 'servent'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(244) : error C2011: 'protoent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(185) : see declaration of 'protoent'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(400) : error C2011: 'sockaddr_in' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(321) : see declaration of 'sockaddr_in'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(410) : error C2011: 'WSAData' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(331) : see declaration of 'WSAData'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(470) : warning C4005: 'SO_DONTLINGER' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(411) : see previous definition of 'SO_DONTLINGER'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(527) : warning C4005: 'AF_IPX' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(469) : see previous definition of 'AF_IPX'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(555) : warning C4005: 'AF_MAX' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(488) : see previous definition of 'AF_MAX'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(561) : error C2011: 'sockaddr' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(494) : see declaration of 'sockaddr'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(601) : error C2011: 'sockproto' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(503) : see declaration of 'sockproto'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(640) : error C2011: 'linger' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(540) : see declaration of 'linger'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(653) : warning C4005: 'SOMAXCONN' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(553) : see previous definition of 'SOMAXCONN'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(679) : warning C4005: 'FD_READ' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(571) : see previous definition of 'FD_READ'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(682) : warning C4005: 'FD_WRITE' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(572) : see previous definition of 'FD_WRITE'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(685) : warning C4005: 'FD_OOB' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(573) : see previous definition of 'FD_OOB'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(688) : warning C4005: 'FD_ACCEPT' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(574) : see previous definition of 'FD_ACCEPT'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(691) : warning C4005: 'FD_CONNECT' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(575) : see previous definition of 'FD_CONNECT'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(694) : warning C4005: 'FD_CLOSE' : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(576) : see previous definition of 'FD_CLOSE'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1626) : error C2375: 'accept' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(744) : see declaration of 'accept'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1647) : error C2375: 'bind' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(749) : see declaration of 'bind'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1666) : error C2375: 'closesocket' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(754) : see declaration of 'closesocket'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1685) : error C2375: 'connect' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(756) : see declaration of 'connect'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1706) : error C2375: 'ioctlsocket' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(761) : see declaration of 'ioctlsocket'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1727) : error C2375: 'getpeername' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(766) : see declaration of 'getpeername'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1748) : error C2375: 'getsockname' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(771) : see declaration of 'getsockname'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1771) : error C2375: 'getsockopt' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(776) : see declaration of 'getsockopt'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1792) : error C2375: 'htonl' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(783) : see declaration of 'htonl'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1809) : error C2375: 'htons' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(785) : see declaration of 'htons'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1826) : error C2375: 'inet_addr' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(787) : see declaration of 'inet_addr'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1843) : error C2375: 'inet_ntoa' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(789) : see declaration of 'inet_ntoa'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1861) : error C2375: 'listen' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(791) : see declaration of 'listen'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1879) : error C2375: 'ntohl' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(795) : see declaration of 'ntohl'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1896) : error C2375: 'ntohs' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(797) : see declaration of 'ntohs'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1916) : error C2375: 'recv' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(799) : see declaration of 'recv'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1941) : error C2375: 'recvfrom' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(805) : see declaration of 'recvfrom'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1967) : error C2375: 'select' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(813) : see declaration of 'select'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(1991) : error C2375: 'send' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(820) : see declaration of 'send'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2016) : error C2375: 'sendto' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(826) : see declaration of 'sendto'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2042) : error C2375: 'setsockopt' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(834) : see declaration of 'setsockopt'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2064) : error C2375: 'shutdown' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(841) : see declaration of 'shutdown'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2084) : error C2375: 'socket' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(845) : see declaration of 'socket'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2107) : error C2375: 'gethostbyaddr' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(852) : see declaration of 'gethostbyaddr'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2126) : error C2375: 'gethostbyname' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(857) : see declaration of 'gethostbyname'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2144) : error C2375: 'gethostname' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(859) : see declaration of 'gethostname'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2163) : error C2375: 'getservbyport' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(863) : see declaration of 'getservbyport'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2182) : error C2375: 'getservbyname' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(867) : see declaration of 'getservbyname'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2200) : error C2375: 'getprotobynumber' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(871) : see declaration of 'getprotobynumber'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2217) : error C2375: 'getprotobyname' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(873) : see declaration of 'getprotobyname'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2237) : error C2375: 'WSAStartup' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(877) : see declaration of 'WSAStartup'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2255) : error C2375: 'WSACleanup' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(881) : see declaration of 'WSACleanup'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2272) : error C2375: 'WSASetLastError' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(883) : see declaration of 'WSASetLastError'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2289) : error C2375: 'WSAGetLastError' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(885) : see declaration of 'WSAGetLastError'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2306) : error C2375: 'WSAIsBlocking' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(887) : see declaration of 'WSAIsBlocking'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2323) : error C2375: 'WSAUnhookBlockingHook' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(889) : see declaration of 'WSAUnhookBlockingHook'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2340) : error C2375: 'WSASetBlockingHook' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(891) : see declaration of 'WSASetBlockingHook'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2357) : error C2375: 'WSACancelBlockingCall' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(893) : see declaration of 'WSACancelBlockingCall'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2379) : error C2375: 'WSAAsyncGetServByName' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(895) : see declaration of 'WSAAsyncGetServByName'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2406) : error C2375: 'WSAAsyncGetServByPort' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(903) : see declaration of 'WSAAsyncGetServByPort'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2432) : error C2375: 'WSAAsyncGetProtoByName' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(911) : see declaration of 'WSAAsyncGetProtoByName'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2457) : error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(918) : see declaration of 'WSAAsyncGetProtoByNumber'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2482) : error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(925) : see declaration of 'WSAAsyncGetHostByName'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2509) : error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(932) : see declaration of 'WSAAsyncGetHostByAddr'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2532) : error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(941) : see declaration of 'WSACancelAsyncRequest'
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock2.h(2552) : error C2375: 'WSAAsyncSelect' : redefinition; different linkage
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winsock.h(943) : see declaration of 'WSAAsyncSelect'
c:\documents and settings\ashu\desktop\project4a\project4a\Sockets.h(126) : error C2079: 'SocketListener::tcpAddr' uses undefined struct 'sockaddr_in'
Build log was saved at "file://c:\Documents and Settings\ashu\Desktop\Project4a\Project4a\Debug\BuildLog.htm"
Project4a - 58 error(s), 11 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
|
|
|
Looks like you will need to remove "winsock.h" or "winsock2.h" as an included header.
|
|
|
|
|
hi and a big hello!
i wanna code a new server to control a pc.but with ability to be upgrated in future.does anybody know about plugin?
how can i use it in my program?
|
|
|
|
|
i wanna know how i can use messenger or mail services in my code to send infromation to an id in background or in secret way.
-- modified at 1:10 Saturday 22nd April, 2006
|
|
|
|
|
hi
i'm working on a remote admin project but.and it is a big but, i have a problem with controlling file in remote pc.
i wanna see the whole file && dir as i am see in my pc.i mean visual control!i wanna a code more power than ftp trasnfer.
thanks for ur reply
-- modified at 1:03 Saturday 22nd April, 2006
|
|
|
|
|
Can anyone tell me how do I display the selected Node name of a treeView in a text box.
I have treeView containing Nodes(e.g. strings), When the user clicks on a particular string in the treeView, that string should get displayed into a textBox. What code do I need to write in treeView_NodeMouseClick event.
|
|
|
|
|
Could anyone tell me what I'm doing wrong here:
<code>
// variables defined
private: array<String^>^ m_sAddressList = gcnew array<String^>{"localhost"};
private: int m_nCurrentAddress;
...
// attempting to make a property out of them
public: property array<String^>^ m_psAddressList{
String^ get(){ return array<m_sAddressList>(m_nCurrentAddress);}
}
</code>
I'm getting the following compiler error:
error C3901: 'get': must have return type 'cli::array<Type> ^' c:\documents and settings\john\my documents\programming\visual studio 2005\projects\winbot\winbot\ConnectionOperations.h 53
Any information would be greatly appreciated.
Thanks,
John
|
|
|
|
|
The 'get' must return an array to be consistent with how you've defined the property - e.g., return m_sAddressList. It's not clear what you are attempting to return.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
Forgive my ingnorance but what is with the '^' chaacter?
The way you are using it is a syntax error in C++.
INTP
“Testing can show the presence of errors, but not their absence.”
Edsger Dijkstra
|
|
|
|
|
John R. Shaw wrote: Forgive my ingnorance but what is with the '^' chaacter?
The way you are using it is a syntax error in C++.
Hi,
It would be a syntax error in standard c++ but isn't this the (Managed) C++/CLI discussion board? Therefore i would like to point out: "The carat operator (^) (often called a "hat" by C++/CLI folks) indicates that a variable or parameter refers to a reference-type object." Or did i misread your point?
regards Tobias
|
|
|
|
|
2beeOr did i misread your point?
Nope! You told me exactly what I wanted to know. I had a feeling it was something like that, as if C++ did not have enough operators already.
INTP
“Testing can show the presence of errors, but not their absence.”
Edsger Dijkstra
|
|
|
|
|
Hi,
I am trying to write a very simple application that mixes MFC with C++ Managed. I have two questions:
1. Is it possible to build the mixed project with the MFC library statically linked. I get some errors of conflict which I don't get when building with dynamically linked.
2. I want to use .NET functions that ask for System::String^ str. When I supply these functions with CString I get error. I read every where that it suppose to work.
CString str = _T("Works");
CString str2 = _T("Doesn't Work");
String ^ stringEx = gcnew String( str ); // OK
strinEx = str2; // Is not working
Thanks.
-- modified at 4:32 Thursday 20th April, 2006
eladbo
|
|
|
|
|
Hi,
You cannot assign an CString object to a string. Every string assignment in .NET creates a new string on the garbage collector and recycles the old one. There is no global defined assignment operator for this available
You could try to write:
strinEx = gcnew String(str);
This makes no difference to the other assignment.
|
|
|
|
|
Hi,
The answer to the first question is probably that it is impossible to do static linking since the code produced for managed application is not native binary code but MSIL.
For different string conversions check following article:
http://msdn2.microsoft.com/en-us/library/ms235631.aspx
Max
|
|
|
|
|
Thanks for the information
eladbo.
|
|
|
|
|
I'm trying to build a dll with the code in the article linked below for use in an otherwise C# (NET1.1) based project. The article itself only includes the class itself, and not any of the packaging needed to run. I tried creating a managed dll, and then just pasting the class data into the cpp/h files. I quickly ran into problems first with it not finding .net types, and then once I added those I started getting linker errors, and quickly got stuck since I haven't done anything c++ related in a long time. I assume I'm missing at least one include statement, but don't know which one.
The only change I've made to the code linked below was to pull the kernel32 stuff back into the main namespace.
http://www.codeproject.com/managedcpp/howtocomport.asp
the errors I'm getting from the linker at the moment are:
SerialPort error LNK2020: unresolved token (0A000025) _CxxThrowException
SerialPort error LNK2020: unresolved token (0A000027) delete
What I have at the moment is below:
SerialPort.h
#pragma once
using namespace System;
using namespace System::IO;
using namespace System::Runtime::InteropServices;
using namespace std;
#ifndef NULL
#define NULL 0
#endif
namespace SerialPort
{
}
SerialPort.cpp
#include "stdafx.h"
#include "SerialPort.h"
namespace SerialPort
{
}
stdafx.h
#pragma once
#include<new>
#include<iostream>
|
|
|
|
|
If I have a service running set up with Local System account.
I will get the "System variable" PATH value when calling
getenv("TEMP")
When I later run my client, I will get the current users TEMP path with the same call. Since that user as it's own defenition of TEMP
How can I get the "System variable" value for the TEMP variable when running as a "normal" user?
//T
|
|
|
|
|
%temp%<br />
%tmp%<br />
%tmpdir%
otherwise, %windir%\Temp
|
|
|
|
|
ok, i need a line of code to turn off all computers on a LAN i have the rest of the code i just need that one line
|
|
|
|
|
for_each(Lan.getComputers(), TurnOff());
one line...
|
|
|
|
|
|
Try this (but this have a two lines
<br />
for (i = 0; i < LANComputers.count; ++i)<br />
ShutDown(LANComputers);<br />
maybe take action!
-----------------------------------------------------------------
Surely without war there would be no loss
Hence no mourning, no grief, no pain, no misery
No sleepless nights missing the dead... Oh, no more
No more war
[Sleepless - Cradle of Filth]
|
|
|
|
|
Hi all!
ich searching for a tftp library which i can used e.g.
to write an application which can upload and download
cisco configuration files.
I searched with google but i got no usable result.
Thx for help.
Best Regards
madcat
|
|
|
|
|
Not a stand-alone library but I'm guessing you can extract the source which you want from here.
Ed
|
|
|
|
|