Creating a DLL

Discussion in 'C Programming' started by fyderniX@gmail.com, Apr 3, 2007.

  1. Guest

    Hey;

    First things first: I'm an ignorant student and have no clue what I'm
    doing.

    I'm trying to compile the open source fitz/muPDF library (C) used in
    the Sumatra PDF Viewer (http://blog.kowalczyk.info/software/
    sumatrapdf/) into a dll for use via P/Invoke (C#).

    I'm using Visual C++ Express 2005. Everything seemed to work fine,
    and the plethora of .c and .h files compiled/linked with the following
    options:

    /Od /I "c:\Documents and Settings\eric\Desktop\AUCAS\AUCAS
    \sumatra-06March2007\fitz\include" /I "c:\Documents and Settings\eric
    \Desktop\AUCAS\AUCAS\sumatra-06March2007\ext\jpeg" /I "c:\Documents
    and Settings\eric\Desktop\AUCAS\AUCAS\sumatra-06March2007\ext\zlib" /I
    "c:\Documents and Settings\eric\Desktop\AUCAS\AUCAS
    \sumatra-06March2007\ext\freetype231\include" /D "_WIN32" /D "WIN32" /
    D "_WINDOWS" /D "_DEBUG" /D "DEBUG" /D "NEED_MATH=1" /D
    "NEED_STRLCPY=1" /D "NEED_STRSEP=1" /D "_MBCS" /Gm /RTC1 /MTd /GR- /
    Fo"Debug-fitz\\" /Fd"C:\Documents and Settings\eric\Desktop\AUCAS\AUCAS
    \sumatra-06March2007\Debug-fitz\fitzlib_d.pdb" /W3 /nologo /c /ZI /TC /
    wd4996 /wd4244 /wd4267 /wd4995 /FC /errorReport:prompt

    However, when I try to call functions from the dll, the library is
    loaded but the function is never found. Running 'Dumpbin.exe /
    EXPORTS' on it shows a very short output and no method names.

    Any help?

    SigmaX
     
    , Apr 3, 2007
    #1
    1. Advertising

  2. CBFalconer Guest

    wrote:
    >
    > First things first: I'm an ignorant student and have no clue what
    > I'm doing.
    >
    > I'm trying to compile the open source fitz/muPDF library (C) used
    > in the Sumatra PDF Viewer (http://blog.kowalczyk.info/software/
    > sumatrapdf/) into a dll for use via P/Invoke (C#).
    >
    > I'm using Visual C++ Express 2005. Everything seemed to work fine,
    > and the plethora of .c and .h files compiled/linked with the
    > following options:


    My condolences on being stuck with Microsoft software and systems.
    However this is off-topic here, where we deal with the portable C
    language. Especially there is no such thing as a 'dll' in the C
    language. Try a newsgroup that deals with your system, which will
    probably have 'microsoft' or 'windows' in its name. See the
    following links.

    --
    Some useful references about C:
    <http://www.ungerhu.com/jxh/clc.welcome.txt>
    <http://www.eskimo.com/~scs/C-faq/top.html> (C-faq)
    <http://benpfaff.org/writings/clc/off-topic.html>
    <http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
    <http://www.dinkumware.com/refxc.html> (C-library}
    <http://gcc.gnu.org/onlinedocs/> (GNU docs)
    <http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>


    --
    Posted via a free Usenet account from http://www.teranews.com
     
    CBFalconer, Apr 3, 2007
    #2
    1. Advertising

  3. jacob navia Guest

    a écrit :
    > Hey;
    >
    > First things first: I'm an ignorant student and have no clue what I'm
    > doing.
    >


    Yes, you are trying to use C++ with C, for starters.

    There are so many things that you need to learn before being able to do
    this that it would be impossible to explain everything here.

    HINT:

    The author provides a binary compiled eecutable.
    Use that.
     
    jacob navia, Apr 4, 2007
    #3
  4. Guest

    On Apr 3, 6:51 pm, CBFalconer <> wrote:
    > My condolences on being stuck with Microsoft software and systems.


    Thanx for the sympathy. What I wouldn't give to be using Linux.

    > However this is off-topic here, where we deal with the portable C
    > language. Especially there is no such thing as a 'dll' in the C
    > language. Try a newsgroup that deals with your system, which will
    > probably have 'microsoft' or 'windows' in its name. See the
    > following links.


    Thanx for the pointers.

    > --
    > Some useful references about C:
    > <http://www.ungerhu.com/jxh/clc.welcome.txt>
    > <http://www.eskimo.com/~scs/C-faq/top.html> (C-faq)
    > <http://benpfaff.org/writings/clc/off-topic.html>
    > <http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
    > <http://www.dinkumware.com/refxc.html> (C-library}
    > <http://gcc.gnu.org/onlinedocs/> (GNU docs)
    > <http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>
    >
    > --
    > Posted via a free Usenet account fromhttp://www.teranews.com
     
    , Apr 4, 2007
    #4
  5. jaysome Guest

    On 4 Apr 2007 13:06:39 -0700, wrote:

    >On Apr 3, 6:51 pm, CBFalconer <> wrote:
    >> My condolences on being stuck with Microsoft software and systems.

    >
    >Thanx for the sympathy. What I wouldn't give to be using Linux.


    You don't have to give anything.

    http://www.ubuntu.com/

    --
    jay
     
    jaysome, Apr 6, 2007
    #5
  6. jaysome said:

    > On 4 Apr 2007 13:06:39 -0700, wrote:
    >
    >>On Apr 3, 6:51 pm, CBFalconer <> wrote:
    >>> My condolences on being stuck with Microsoft software and systems.

    >>
    >>Thanx for the sympathy. What I wouldn't give to be using Linux.

    >
    > You don't have to give anything.
    >
    > http://www.ubuntu.com/


    Sure. But please remember that many people do not have control over the
    choice of tool chain, and particularly over the choice of OS. Junior
    professionals[1], students, kids learning at home on their mummy's
    computer, etc etc.

    [1] Which we might define as "anyone not sufficiently senior to be able
    to get away with installing Linux on the machine he uses at work". By
    this definition, it is entirely possible that Bill Gates is the only
    senior programmer in Microsoft!

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
     
    Richard Heathfield, Apr 6, 2007
    #6
    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. Anushi
    Replies:
    5
    Views:
    8,997
  2. Weston Fryatt
    Replies:
    2
    Views:
    1,037
    Weston Fryatt
    Jan 1, 2005
  3. NGM
    Replies:
    0
    Views:
    2,358
  4. wpy
    Replies:
    1
    Views:
    385
    -=Chris=-
    Nov 11, 2003
  5. H. Simpson
    Replies:
    4
    Views:
    342
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page