|
|
|
|||||
|
slice2cpp -U to undef min and max macros
I have a slice struct which contains members min and max. This works fine
with gcc. When I use a MSVC compiler it complains about not enough actual parameters for macro min. Oops, forgot that MSVC has legacy macros for min and max. Solution, undef min and max. However this has to be done by the slice2cpp program. I noticed there is a -U argument to slice2cpp which would solve the problem. However I can't seem to get it generate the undef statements (tried both `-Umin' and `-U min'). I had a bit of a look through src/slice2cpp/Gen.cpp src/Slice/Preprocessor.cpp but couldn't find where it output the undef statements. I thought it would be around line 253 of Gen.cpp (3.0.1). After:- H << "\n#include <Ice/UndefSysMacros.h>"; Regards Stuart
__________________
Stuart Argue University Of Wollongong, Australia (Eng/CS Student) http://www.uow.edu.au Project: Savvi: Student Assessment Viewer and Voluntry Interaction - Advanced WebCT replacement - Native GUI and HTML interfaces Development Platform: Debian/GNU, g++, scons, boost, Qt Target: Services: Unix; clients: Win, MacOS, Linux Status: pre-Alpha Development cycle: spare time Chance of going commercial: yes (late 2006) |
|
|||||
|
Thanks Bernard,
Good solution. I just ended up renaming min to minVal etc. Not a big change. Got a bit sidetracked on why -U wouldn't work. Thanks Stuart
__________________
Stuart Argue University Of Wollongong, Australia (Eng/CS Student) http://www.uow.edu.au Project: Savvi: Student Assessment Viewer and Voluntry Interaction - Advanced WebCT replacement - Native GUI and HTML interfaces Development Platform: Debian/GNU, g++, scons, boost, Qt Target: Services: Unix; clients: Win, MacOS, Linux Status: pre-Alpha Development cycle: spare time Chance of going commercial: yes (late 2006) |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Patch #2 for Ice 3.1.1: Missing dllexport macros | dwayne | Patches | 0 | 11-06-2006 09:35 AM |
| slice2cpp - DLL usage | timp | Help Center | 2 | 01-12-2006 01:03 PM |
| slice2cpp possible problem | g00fy | Bug Reports | 2 | 01-10-2006 02:53 PM |
| Slice2cpp question | Mr.Freeze | Help Center | 1 | 12-11-2003 10:55 AM |
| slice2cpp & --include-dir | vukicevic | Bug Reports | 2 | 12-02-2003 11:40 PM |