I've been trying to improve the build times for my product. We're using continuous integration, and our builds are now taking 2 hours to run.
I've looked at the NANT timings and see alot of places that are slower than they should be, but one that jumps out is the x64 builds of our Visual C++ projects. Here's an example of the timings ...
I am working on a database project that requires me to code in C++. I have the framework for the relational database built using Microsoft Access. Since I would like a GUI for the user, I am trying to use Visual C++ 2008 to build it.
I have tried to build a solution as a win32 console app, MFC app, and CLR app, each halting me with thei...
I am in the process of migrating our VC++ project from Visual Studio 2005 (VC8) to Visual Studio 2008 (VC9). Some of the projects in the solution have paths to third party libraries in their 'Additional Library Directories' field in the project settings. The paths look something like this:
..\SomeLibrary\Lib\vc9\x86
It would be really u...
Hi,
I'm creating a basic COM component so I can practice creating them.
I'm exporting DllRegisterServer, DllUnregisterServer,DllGetClassObject and DllCanUnloadNow from a .def file with the PRIVATE keyword(I think Microsoft requires it).
Anway, I specified all 4 functions with extern "C" and yet I'm still getting mangling.
Here is my ....
I'm trying to write a very simple program to replace an existing executable. It should munge its arguments slightly and exec the original program with the new arguments. It's supposed to be invoked automatically and silently by a third-party library.
It runs fine, but it pops up a console window to show the output of the invoked progr...
Compiling the same code on two different machines. We have int functions that are not explicitly defined as such in the CPP file.
One machine compiles fine, the other doesn't. What's really weird is that they were both working fine until yesterday. One of the machines lost its visual studio include and link paths and now the compile is ...
Hi All,
We have the following class structure in our code
Class A: public CDialog, public Base1, public Base2
{
};
In implementation of Class A we have the following:
BEGIN_MESSAGE_MAP( A, CDialog )
ON_WM_SIZE()
END_MESSAGE_MAP()
Please note Base1 and Base2 doesn't inherit from CDialog or any other MFC classes.
On VC6 the com...
Here is my folder structure:
/
|
-- program.cpp
-- utility.h
-- utility.cpp
|
-- module/
|
-- utility.h
-- utility.cpp
// Note that I have two files named utility.h and two named utility.cpp
On building the project, I get a link error (LNK2028: unresolved token and so on...) saying that some symbols aren't defined. ...
I am having a very weird problem with Visual C++ 2008, on certain projects I cannot properly open the "Additional Include Directories" dialog box anymore. I get the following window instead, which is missing the list itself, and where the "macros" button doesn't work. No matter what the "Additional Include Directories" field contains, ev...
The code below compiled in Debug configuration in VS2005 SP1 shows two messages with “ITERATOR LIST CORRUPTED” notice.
Code Snippet
#define _SECURE_SCL 0
#define _HAS_ITERATOR_DEBUGGING 0
#include <sstream>
#include <string>
int main()
{
std::stringstream stream;
stream << "123" << std::endl;
std::string str = stream.str();
s...
I manage project for JNI for both compilers: MSVC++ 8.0 and 9.0,
my cpp file contains following implementation:
extern "C" {
JNIEXPORT jlong JNICALL Java_context_ServiceProviderContext_StartServiceProvider
(JNIEnv * env, jclass, jstring jspath){
.....
}
With help of depends.exe utility I can see that MSVC 8.0 successfu...
I'm looking for a way to use some variant of vsnprintf() with a buffer that can possibly be longer than the input buffer without triggering an error to the user.
So far I've found that vsnprintf() and its variants silently truncate the string when the buffer is too small but they don't return the actual length of the string so I can't t...
I've done some inline ASM coding for SSE before and it was not too hard even for someone who doesn't know ASM. But I note MS also provide intrinsics wrapping many such special instructions.
Is there a particular performance difference, or any other strong reason why one should be used above the other?
To repeat from the title, this is ...
Hi guys,
I've run into the following annoying and seemingly incorrect behaviour in the Visual Studio 2008 C++ compiler:
Suppose I have a class library - Car.lib - that uses a "Car" class, with a header called "Car.h":
class Car
{
public:
void Drive()
{
Accelerate();
}
void Accelerate();
};
What I'm actual...
Doing Managed C++ in VS2008. Have a vendor defined data structure as follows:
class API TF_StringList
{
public:
TF_StringList(const char* encoding = "cp_1252");
~TF_StringList();
TF_String* first_string() const {return start_string;}
TF_String* last_string() const {return end_string;}
void insert(const TF_String& aString);
voi...
I'm trying to debug a problem in a DLL written in C that keeps causing access violations. I'm using Visual C++ 2008, but the code is straight C.
I'm used to Delphi, where if an exception occurs while running under the debugger, the program will immediately break to the debugger and it will give you a chance to examine the program state...
In Visual C++ (2008 and 2010), the following code does not compile with the following error:
#include <memory>
void Foo( std::shared_ptr< int > test = ::std::make_shared< int >( 5 ) )
{
}
class P
{
void
Foo( std::shared_ptr< int > test = ::std::make_shared< int >( 5 ) )
{
}
};
error C2039: 'make_shared' : is not a...
I have a program that doesn't seem to recognize declared types in the latest U3D software. There's a line
typedef BOOL (WINAPI* GMI)(HMON, LPMONITORINFOEX);
which gets the error:
Error 1 error C2061: syntax error : identifier 'LPMONITORINFOEX' c:\Projects\U3D\Source\RTL\Platform\Common\Win32\IFXOSRender.cpp 28
and a line
...
Hopefully someone can tell me what's going on here. I'm trying to link to gdiplus.lib and I tried to go to "Properties - Linker - Input - Additional Dependencies" to add the library but I do NOT have that section. I'm using Visual C++ 2008. Here's what I see:
Common Properties
Framework and References
Configuration Properties
Gen...
Using VS2008, we would like to simulate a file that has a size of X, but that has a read failure at X-Y bytes, so that we get an error indication.
Anyone have an idea of how to do this on windows? Looks like there is a solution for linux, but I can't really come up with a way to do this on windows. We have multiple developers, multiple...