X64 compilation problems
-
I have some problems when porting a WIN32 project into 64-Bit using VS2008. 1. I am using many third party libraries in my WIN32 project in which one of them uses old iostream functions. It gives me linker error LNK1104: cannot open file 'LIBCIMT.LIB' when I compile in X64 mode. I have the source code of the library with me. I tried recompiling the third party library using the new iostream header files under VS2008, but it gives me compilation errors which seems to be some in-compatibility issues of new and old iostreams. 2. In my project, I use both SQL and MAPI. The project compiles and runs perfectly in WIN32 mode. But the same gives me compilation error C2371: 'BOOKMARK' : redefinition; different basic types Here is a sample code to reproduce the problem.
#include "stdafx.h" #include <comdef.h> #include <atlbase.h> #include <sqlext.h> #include <mapix.h> int _tmain(int argc, _TCHAR* argv[]) { return 0; }
All the header files are from the VS2008 installation folder. How do I solve these problem with minimal changes in my code Thanks in advance
cheers Varghese Paul
-
I have some problems when porting a WIN32 project into 64-Bit using VS2008. 1. I am using many third party libraries in my WIN32 project in which one of them uses old iostream functions. It gives me linker error LNK1104: cannot open file 'LIBCIMT.LIB' when I compile in X64 mode. I have the source code of the library with me. I tried recompiling the third party library using the new iostream header files under VS2008, but it gives me compilation errors which seems to be some in-compatibility issues of new and old iostreams. 2. In my project, I use both SQL and MAPI. The project compiles and runs perfectly in WIN32 mode. But the same gives me compilation error C2371: 'BOOKMARK' : redefinition; different basic types Here is a sample code to reproduce the problem.
#include "stdafx.h" #include <comdef.h> #include <atlbase.h> #include <sqlext.h> #include <mapix.h> int _tmain(int argc, _TCHAR* argv[]) { return 0; }
All the header files are from the VS2008 installation folder. How do I solve these problem with minimal changes in my code Thanks in advance
cheers Varghese Paul
Varghese Paul M wrote:
1. I am using many third party libraries in my WIN32 project in which one of them uses old iostream functions. It gives me linker error LNK1104: cannot open file 'LIBCIMT.LIB' when I compile in X64 mode. I have the source code of the library with me. I tried recompiling the third party library using the new iostream header files under VS2008, but it gives me compilation errors which seems to be some in-compatibility issues of new and old iostreams.
That sounds about right. I suspect you're going to have to bite the bullet & just start going through them, fixing them. One thing to remember is that (IIRC) old iostreams weren't in the std namespace, new ones are. Also - this page has some handy migration hints[^].
Varghese Paul M wrote:
2. In my project, I use both SQL and MAPI. The project compiles and runs perfectly in WIN32 mode. But the same gives me compilation error C2371: 'BOOKMARK' : redefinition; different basic types Here is a sample code to reproduce the problem.
You were lucky before. MAPI and SQL both define BOOKMARK. They happened to both be 32-bit, but now they're not. The only things I can suggest are 1) separating SQL and MAPI functionality into separate source files, or 2) putting (say) the MAPI stuff into a namespace like this:
namespace MAPI
{
#include <mapix.h>
}and either using
using namespace MAPI;
or explicitly identifying things in this new MAPI namespace.Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p