473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

preprocessor not working VC++.net.

Hi,
I am porting code from 32 bit to 64 bit using VC++.net 2003 & SDK for
Windows Server 2003 SP1.
When I a compiling below code i expect that it should compile
#if part but actually it is compiling #else code.
Why ???
My project C++ switch to Multi-threaded Debug DLL (/MDd).
#define USE_MFC_CLIST
#if defined(USE_MFC_CLIST) && defined(WIN32)
&& defined (_AFXDLL)
#include <afxtempl.h>
#define v_List CList
typedef POSITION v_ListPOSITION;

#else
//Cybage test. please remove later.
//TRACE("CList is added in compilation");
#include <list>
......
#endif

One more thing if I remove the _AFXDLL then
#if defined(USE_MFC_CLIST) && defined(WIN32)

then if part code gives me the compiled error.

F:\Program Files\Microsoft Platform
SDK\Include\Win64\MFC\AFXV_W32.H(14) : fatal error C1189: #error :
WINDOWS.H already included. MFC apps must not #include <windows.h>
Your suggestion is appreciated.

Nov 17 '05 #1
0 826

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Sabyasachi Basu | last post by:
While trying to port some stuff from Unix to Windows, I encountered a strange behaviour of function macros with empty arguments. Here is a small snippet which illustrates the problem: #include...
5
by: Boris Kuznetsov | last post by:
This occurs in an empty project when I add the following string: #using <mscorlib.dll> Can anyone tell me why would #using ... not be working???? MSDN says nothing about this error. Please...
8
by: mrstephengross | last post by:
I'm using gcc 3.3.1 to compile the following code (below). I've written a macro to simplify writing operators. The macro uses the '##' operator to paste together 'operator' and the name of the...
24
by: Nudge | last post by:
I have an array, and an unrolled loop which looks like this: do_something(A); do_something(A); .... do_something(A); I thought: why should I type so much? I should write a macro. So I was...
9
by: Walter Roberson | last post by:
I have run into a peculiarity with SGI's C compiler (7.3.1.2m). I have been reading carefully over the ANSI X3.159-1989 specification, but I cannot seem to find a justification for the behaviour....
1
by: wonkim | last post by:
Hi, I want to use preprocessor at VC++ attributes. Isn't it possible? Or, there is another way to use predefined string at attribute code? Thanks ...
3
by: songie D | last post by:
would it be possible to sort of engineer some sort of preprocessor macro that does a 'for' loop. i.e. for where you would normally use a normal for loop, but when it is known ay compile time whay...
2
by: Paolo | last post by:
I imported a VC++6.0 project into VC++7.1. The conversion operation makes a mess with Preprocessor Definitions, adding a "$(NoInherit)" for each file. For example: I had a DLL project in VC++6.0...
4
by: David W | last post by:
In VS .NET 2003 (SP1) I wanted to add a preprocessor symbol to all configurations of all projects in a solution. I selected all the projects and then went to Properties, where I went to the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.