Answer Questions
supersonic_oasis Timing the compiler
The Visual C++ 2003 linker has an undocumented /TIME option which reports how much time the linker has spent on each phase. Is there a corresponding option for the compiler It would be helpful to know exactly how long each file took to compile. I have a 146-file project taking nearly 30 minutes to build; it would be quite helpful to find out where the delays are. The compiler is ultrafast in co ...Show All
Flyboy compiler bug with templates, VC++2005
Hi, I think I've found a compiler bug with templates. I've tested this code with VS2003, and VS2005 Beta 2. The following code will produce a warning when compiled, and I can't see any reason for the warning. I've simplified the code as much as possible while it is still producing the warning. Thanks, Niall. c:\documents and settings\niall\my documents\visual studio 2005\projects\test\test\test.cpp(23) : warning C4267: 'argument' : conversio ...Show All
nathanshih MemoryStream
This does not work: MyStream is a MemoryStream InsertString = String::Format ("insert into blobtest (blobtest) values ('{0}');", MyStream->GetBuffer()); MyStream->GetBuffer() just returns "System.Byte[]", not the actual data, which is what I want. You can see what I'm trying to accomplish here. Why isn't it working Before I answer this question, I'd like to know how you obtained ...Show All
cb1024 BeginInvoke help!
From what I read, BeginInvoke can be used to call functions that take a long time to execute by making them execute on a separate thread. I wrote a little test program to try this and I cant get it to work. Forgive me if I have got it completely wrong, i've only moved from 'C' to VC++.NET in the last few months. I have a button that when clicked should run a little delay routine (large_function in external_class) for a couple of seco ...Show All
Pwrman02038 Mixing Managed and Unmanaged C++
Hi All, I'm a beginner in this managed C++. Currently, all of our existing system is coded in unmanaged C++ w/ OpenGL. Then, at the moment, there is a need to produce a binary file that is readable both in current C++ and C# (using BinaryReader). With this requirement, I ASSUME that I need to code that file function in managed C++ inside the current system. However, there are a lot of errors coming out as soon as I switch the /clr switch o ...Show All
Raja Ram Singh Cannot open file 'libcimt.lib'
My project compiles fine under VS 6 but gives a linker error under VS 2005. LINK : fatal error LNK1104: cannot open file 'libcimt.lib' What is the problem here and how can it be fixed Thanks. Jess You seem to be using the obsolete non-template based iostream library. You need to use the new one, thereby removing the dependency on the old lib, and also remove the lib from your p ...Show All
rafaelc Where is <inttypes.h>
I am working through the book C Primer Plus by Stephen Prata. He has placed an exercise in Chapter 3 that deals with portable types. I am trying to use <inttypes.h> however, the compiler says that it is not able to find the header. Below is the output I received. Does anyone know where I could find this header for Visual Studio 1>------ Build started: Project: altnames, Configuration: Debug Win32 ------ 1>C ...Show All
weepecky "Preprocessor Definitions" for "All Configurations" wipes out Release and Debug settings
With the July cpt create a new solution (e.g. WIN32 console). Select "All Configurations" from the property pages and add an entry e.g. TEST to the "Preprocessor Definitions". Now examine the Release or Debug "Preprocessor Definitions" and notice that the original entries have beed deleted. I see that bug FDBK2612 has been recorded against this issue. Given that it's called " ...Show All
Michael Ingmar Staib Is Controlling Function thread-safe?
Hello VC++ forum, I am using AfxBeginThread in a multi-thread application and wondering whether its controlling function is thread-safe. Here is a sample code: //=============================== class c { public: c(int nType); startthread(); int m_nType; }; c::startthread() { CWinThread *pThread = AfxBeginThread(foo,this,..);} UINT foo(LPVOID) { //The controlling function ... //Check c object's type to perform acc ...Show All
Oh the pain C++ email using CDO/Mapi in a NT Service
Hi, I'm trying to get some Exchange Server email support inside a c++ Win32 NT Service. Using CDO as follows: #import <cdo.dll> no_namespace rename( "Folder" , "newFolder" ) rename( "GetMessage" , "newGetMessage" ) I do the usual CoInitializeEx(NULL,COINIT_MULTITHREADED); // email stuff.... CoUninitialize(); The problem is with the old email stuff when I get to Logon, namely... _SessionPtr pSession( "MAPI.Session" ); / ...Show All
RENE ROMAN profiler for c++ native makefile in vs .net 2003
How can I profile a makefile What app. do I use for profiling I need manual switches for compier - I don't know what to do with DevPartner about this. OK, I have the following c++ project: hello.cpp ------------ #include <stdio.h> int main() { printf("Hello"); return 0; } Makefile ------------ hello.exe: hello.cpp cl hello.cpp ...Show All
JonnyDeep VC equivalent of dirent
I'm porting some code from another environment which defined an dirent.h and had an dirent structure which was used with opendir/readdir/closedir functions... What is the VC equivalent to these functions, as VC doesn't have the dirent.h, dirent struct and/or the opendir/readdir/closedir functions (or at least I'm not able to find them in the help or in the directories). Thanks, George Those functions are BSD/UNIX specific functions t ...Show All
Tim Daniels error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'
Hello! I habe Visual Studio 2005 pro. I was triing to build this simple program : #include <iostream> int main() { printf( "!!!!!!!!!!!!!!!!!\n" ); getchar(); } and had received this error: ------ Rebuild All started: Project: 123, Configuration: Debug Win32 ------ Deleting intermediate and output files for project '123', configuration 'Debug|Win32' Compiling... 123.cpp Linking... Embedding ...Show All
TexW calling managed code from unmanaed
hey guys, im wondering, if i wrote pure unmanaged code, and that code, calls managed .net code. is that possiible and will it be effiecent in games i was thinking, cause managed code could be the scripts as C#, since it has a compiler namespace. and i want the main engine to be c++ unmanaged so i can use it later on for xbopx and ps games. is it posible and will i need the .net framework to call the managed code th in ...Show All
Pleb How do you create a single .exe installer file?
I'm a psychology grad student at Miami U. in Ohio, and I need to come up with a way to create an installer for a program that is a single .exe file. I have been using Installshield for Microsoft Visual Studio C++ 6 to create an install disk with all the files needed for install on it. However, I need it to be just one file, so that when someone downloads it and opens it, it will begin the install and extract all the needed program files from jus ...Show All
