bcc32 and huge declarations

This is a discussion on bcc32 and huge declarations within the C Programming forums, part of the General Programming Boards category; I have a c program with a few huge pointers defined as follows: unsigned char huge *pA; The command line ...

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    3

    bcc32 and huge declarations

    I have a c program with a few huge pointers defined as follows:

    unsigned char huge *pA;

    The command line to compile the program was:

    bcc -mh program.c

    I now need to compile the program using bcc32 which does not recognize the huge memory model command line option (-mh) nor does it recognize declarations of huge pointers as being valid.

    What do I need to do to get it to compile with bcc32? Can I just declare them as regular pointers and compile the program with 'bcc32 program.c'? Will bcc32 take care of the previsously declared huge pointers automatically now?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    Code:
    #define near /* nothing */
    #define far /* nothing */
    #define huge /* nothing */
    Putting these at the start of the source file is a good way of turning obsolete keywords into nop's.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Jan 2012
    Posts
    3
    Putting these at the start of the source file is a good way of turning obsolete keywords into nop's.
    Can I do this when going from bcc to bcc32 without any repercussions?

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    SourceForge.net: Compilers - predef
    Sure, you just do
    Code:
    #ifdef SOMETHING_IDENTIFYING_FOO_COMPILER
    // stuff you only want with the FOO compiler goes here.
    #endif
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Jan 2012
    Posts
    3
    Thanks for the help! Using your suggestions I was able to compile and run the program without any problems.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. small executable with bcc32
    By mpx in forum C++ Programming
    Replies: 3
    Last Post: 05-05-2005, 11:15 AM
  2. Builder 5 v's bcc32.exe
    By sononix in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2004, 10:17 AM
  3. BCC32 Memory Issue
    By sononix in forum C Programming
    Replies: 5
    Last Post: 08-02-2004, 08:21 AM
  4. using bcc32
    By bigSteve in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2003, 03:08 PM
  5. Linking error using ODBC with C and BCC32
    By D@nnus in forum C++ Programming
    Replies: 0
    Last Post: 11-17-2001, 04:11 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21