About Dlls in Borland C++builder 6 Ent

Discussion in 'C++' started by =?ISO-8859-1?Q?Ren=E9_Kjellerup?=, Feb 15, 2004.

  1. Hi' all

    I've come across a strange thing
    using 'Borland C++Builder 6 Ent'
    and are now looking for how this
    all fit together.

    Here is the files that where created
    without the .bpf, .bpr, and .res file:

    (this is a DLL project)

    // --- Unit1.cpp:

    #include <vcl.h>
    #include <windows.h>
    #pragma hdrstop

    // lots of comments generated by DLL Wizard

    #pragma argsused
    int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
    lpReserved)
    {
    return 1;
    }

    // --- Unit1.cpp EOF

    // --- Unit2.cpp:

    #pragma hdrstop

    #include "Unit2.h"

    // if I don't include this non existent file:
    #include "Unit1.h"
    // this doesn't work, Why?

    #pragma package(smart_init)

    void Say(char *What)
    {
    ShowMessage("From within the DLL\n" + (String)What );
    }

    // --- Unit2.cpp EOF

    // --- Unit2.h:

    #ifndef Unit2H
    #define Unit2H

    #endif

    extern "C" void __declspec(dllexport) Say(char *What);

    // --- Unit2.h EOF





    I have noticed that I need to include the file Unit1.h
    in the unit I add to hold my DLL functions even though
    it's never created in the project folder.

    This piece of code is taken from a tutorial on DLL files
    and I came to wonder why my project wouldn't compile,
    and I thought to my self: off cause you'll need the header
    for your main unit of the DLL file project, and used to the
    filenaming in Borland I just wrote '#include "Unit1.h"'
    right next to the other include statement and compiled.
    Everything worked, yes.

    However as I got a little further I noticed that there were
    no Unit1.h any where in the project to be found.

    I came across this as wanted to do the same thing a second DLL
    that are in the project group, lets just call the files:
    Unit3.cpp, Unit4.cpp, and Unit4.h, and I wished to include
    Unit3.h and then I received the error:

    E2209 Unable to open include file 'Unit3.h'

    but if I changed it to the (now to me known) non-existent
    file: Unit1.h. Everything compiled just fine.

    Now I'm asking how can this be?

    Yours R.Kj.
    --As life grows older, I gain experience.
    =?ISO-8859-1?Q?Ren=E9_Kjellerup?=, Feb 15, 2004
    #1
    1. Advertising

  2. "René Kjellerup" <> wrote in message
    news:...
    > Hi' all
    >
    > I've come across a strange thing
    > using 'Borland C++Builder 6 Ent'
    > and are now looking for how this
    > all fit together.
    >
    > Here is the files that where created
    > without the .bpf, .bpr, and .res file:
    >
    > (this is a DLL project)
    >


    As you have phrased it, your question is specific to a particular OS,
    and to a particular development environment, and therefore not
    appropriate for this group.

    If you can replicate your problem with a simple project not involving
    DLLs, you may get a good answer here. Try to find the simplest example
    that reproduces the error.

    Jonathan
    Jonathan Turkanis, Feb 15, 2004
    #2
    1. Advertising

  3. =?ISO-8859-1?Q?Ren=E9_Kjellerup?=

    Duane Hebert Guest

    "René Kjellerup" <> wrote in message news:...
    > Hi' all
    >
    > I've come across a strange thing
    > using 'Borland C++Builder 6 Ent'
    > and are now looking for how this
    > all fit together.


    newsgroups.borland.com
    Duane Hebert, Feb 15, 2004
    #3
  4. Thanks anyway

    Duane Hebert wrote:
    > "René Kjellerup" <> wrote in message news:...
    >
    >>Hi' all
    >>
    >>I've come across a strange thing
    >>using 'Borland C++Builder 6 Ent'
    >>and are now looking for how this
    >>all fit together.

    >
    >
    > newsgroups.borland.com
    >
    >
    =?ISO-8859-1?Q?Ren=E9_Kjellerup?=, Feb 15, 2004
    #4
  5. =?ISO-8859-1?Q?Ren=E9_Kjellerup?=

    dasan_in

    Joined:
    Mar 22, 2011
    Messages:
    1
    c++ builder programming

    you can view the examples given in site www.ibsoftindia.org

    www.ibsoftindia.org
    dasan_in, Mar 22, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Piotr Karwatka

    Conversion MS VS.NET 2003 - Borland C#Builder

    Piotr Karwatka, Dec 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    353
    Kevin Spencer
    Dec 15, 2004
  2. Terrie
    Replies:
    1
    Views:
    1,376
    Terrie
    Jun 18, 2004
  3. Dariusz Plygawko
    Replies:
    3
    Views:
    425
    Dariusz Plygawko
    Jul 11, 2003
  4. Jakub Dudek
    Replies:
    1
    Views:
    422
    Peter van Merkerk
    Aug 29, 2003
  5. Replies:
    1
    Views:
    1,101
    SuperKoko
    Oct 2, 2006
Loading...

Share This Page