Thread: bcc32 and huge declarations

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.

  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, 04: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, 05:11 AM