Creating a DLL

F

fyderniX

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
 
C

CBFalconer

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>
 
J

jacob navia

(e-mail address removed) 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.
 
F

fyderniX

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.
 
R

Richard Heathfield

jaysome said:
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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top