Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 05-07-2006
StuartA StuartA is offline
Registered User
 
 
Join Date: Feb 2004
Location: Canberra Australia
Posts: 23
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)
Reply With Quote
  #2 (permalink)  
Old 05-08-2006
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
Have you considered editing Ice/UndefSysMacros.h to undefine min and max?

Cheers,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #3 (permalink)  
Old 05-08-2006
StuartA StuartA is offline
Registered User
 
 
Join Date: Feb 2004
Location: Canberra Australia
Posts: 23
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)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -4. The time now is 10:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.