|
Hi Everyone,
The clue's in the title of this post! Does anyone know of a free open source windows C++ compiler and that will interface with MSVC compiled dlls? I know its a tall order, but I was hoping you guys would rise to the challenge. The reason is that I'm making a totally flexible image making program, which is composed of user coded units, which are compiled at runtime, so it will allow users to do graphics programming simply like they did in the dos days, but with a whole lot more power to play with! The system works really well using the MS compiler, problem is that MS will not be impressed if I distribute copies of this program with their compielr included, so does anyone know of an alternative? Thanks for your time....
With time we live, with money we spend!
Joel Holdsworth.
|
|
|
|
|
Hi
Thanks for your a lot input. I'm very impressed by that compiler of yours. It could well become part of my program! It is quite important that the compiler can deal with C++, because I exploit the object orientation and inheriatance heavily, so its not just a case of finding a C compatible compiler...
With time we live, with money we spend!
Joel Holdsworth.
|
|
|
|
|
I'm not sure if you have seen G++, but here is a link to it:
http://www.gnu.org/directory/devel/compilers/gpp.html
Sorry if the GPL licensing is not ok (I'm not sure).
Chris Richardson
|
|
|
|
|
Hello,
Is anyone know that if in the network, computer A keep sending message to computer B but computer B does not execute the recv() routine. What will actually happen? If the answer is buffer overflow, then, is it mean the later message will overwrite the earlier message?
Nachi
|
|
|
|
|
Nothing will happen, the computer a will fail to connect
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Realistically what ultimately occurs if one systems continues sendng packets to another system is a network overflow. In otherwise, the sending system floods the networking connection of the receiving system. In an non-blocking I/O model, the receiving system will continue getting incoming messages.
Kuphryn
|
|
|
|
|
Using #import statement (calling a VB dll from VC)
I have a database app which uses CoInitialize (MFC MDI). Now i want to add another menu item which also will be calling CoInitialize but for a different com library. Is there any danger here with multiple CoInitialize? Also, in my main prj at one place I had (at one time) two #imports but only one CoInitialize. MSDN is cryptic and I;m not too clear about it. At some time I recall someone cautioning against multiple CoInitialize...
Thanks,
ns
|
|
|
|
|
CoInitialize(x) increments a counter, so the worst thing you face is a running object table not cleaned up when the app quits (number of CoUninitialize do not equal number of CoInitialize).
Worth knowing is that each new thread requires a separate CoInitialize(x) call.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
I have a single threaded app, but 2 #import statements for two different dlls. CoUninitialise is balanced so I guess its okay (I hope). By thread you didnt mean function right? But an actual thread?
Thanks,
ns
|
|
|
|
|
Yes I mean an actual thread.
And I don't see the point with #import (this preprocessing compiler directive produces smartptr interfaces from the type-library : there is no CoInitialize call in here).
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Thanks. I dont really have a clear picture of what does what in ADO and ADOX, so I'm learning as I go along. MSDN says it initializes a COM library. Which library is this? I have stuff like:
void CMswayView::OnButton2()
{
BSTR bstrDesc;
try
{
CoInitialize(NULL);
short st = 2;
short st1;
_Class1Ptr ptr;
ptr.CreateInstance(__uuidof(Class1));
ptr->MakeDB();
}
catch(_com_error &e)
{
bstrDesc = e.Description();
}
CoUninitialize();
}
What exactly does CoInitialize do?
Thanks,
ns
|
|
|
|
|
Besides incrementing a counter, CoInitialize(x) initializes the com library, loads oleaut32.dll and other Coxxx functions so you can call them.
_Class1Ptr is a smartptr (atlbase.h, objbase.h) wrapping a COM interface for instance automatically obtained with #import. CreateInstance(CLSID) will do internally a CoCreateInstance(CLSID,...), which is the reason why you have to call CoInitialize(x) first.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
You call CoInit (actually in MFC apps you should use AfxOleInit() instead) once per thread. It doesn't matter how many COM objects you create, how many #imports you have, etc.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
This is really wierd to me...
I'm making a call to a PVCS API function, and am losing information inside my local variables??
I've checked the values of my input parameter and 2 other local variables, and they are valid just before making this PVCS API call.
Somewhere during the call these variable get filled with blanks.
The PVCS function recieves a structure, and its sizeof()+1024, as input.
My question here is whether or not there something else I could do, outside of this function, to protect my variables? I think pointers to the CStrings might work, but I shouldn't have to.
If any of this makes sense, and you can help, please do.
Gracias!
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
Either you aren't supplying enough space to PVCS for one of the arguments or PVCS has a buffer overrun bug.
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
Can anyone tell me why Autocomplete sometimes stops working in the VC6 IDE ??? It works in some functions of the class, but not in others! They can all see each other, and I don't get any errors when compiling! thx!
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Close the IDE, delete .NCB file, restart it and pray.
Concussus surgo.
When struck I rise.
|
|
|
|
|
SWEET!!!!!! YOU 'DA MAN!!!
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Hello,
How can I properly catch key combinations of VK_LEFT (left arrow) and no keys, CTRL, SHIFT, or ALT? Here is the code I have been trying with no luck. The switch for the cursor key works but if statements for the CTRL, SHIFT, etc do not. What am I missing?
Ted
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
void CFEvisGLView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// ALT + arrow keys -> rotate, clockwise/counterclockwise
// SHIFT + arrow keys -> rotate, 90 degree delta
// CTRL + arrow keys -> pan model
switch (nChar) {
case VK_LEFT: // left cursor
if (GetKeyState(VK_CONTROL) == 1) {
// pan left
}
else if (GetKeyState(VK_SHIFT) == 1) {
// rotate horizontally or vertically 90 deg
}
else if (GetKeyState(VK_MENU) == 1) {
// rotate clockwise/counterclockwise
}
else {
// rotate horizontally or vertically
pCamera->Yaw(-10);
}
break;
}
}
|
|
|
|
|
Try something like this:
BOOL bCtrl = (GetKeyState(VK_CONTROL) & 0x8000);
BOOL bShift = (GetKeyState(VK_SHIFT) & 0x8000);
|
|
|
|
|
Hello,
I am using recv() in my Server,
cout << "First recv..." << endl;
recv(clientS, r, 6, 0);
cout << "Second recv..." << endl;
recv(clientS, r, 6, 0);
and in the client side, I do not send any message after I have connected to the server. However, the output of the server is
First recv...
Second recv...
I just wonder that the recv() should be blocking operation, but how come it does not wait for the message come before it goes to another statement?
Thanks for help!
Nachi
|
|
|
|
|
again MSDN:
If no incoming data is available at the socket, the recv call blocks and waits for data to arrive according to the blocking rules defined for WSARecv with the MSG_PARTIAL flag not set unless the socket is nonblocking. In this case, a value of SOCKET_ERROR is returned with the error code set to WSAEWOULDBLOCK. The select, WSAAsyncSelect, or WSAEventSelect functions can be used to determine when more data arrives.
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I am sorry, I actually don't quite understand. The client haven't send any message to the server, how come the recv() does not wait? Actually, I have already read that documentation before, but I don't understand....
Thanks!
Nachi
|
|
|
|
|
I want to use MTS.But I don't know where can I get "MTS Explorer Utility ".Is that part of default installation on windows xp?Where can I find it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
On Windows XP (I'm on XP Pro), there's no MTS anymore. You have COM+ 1.5, fully compatible with MTS. You can find the similar utility on Control Panel/Administrative Tools/Component Services
Concussus surgo.
When struck I rise.
|
|
|
|