0

Would anyone be so kind as point me to a resource that explains how to make calls to a DLL from a C program? My Google skills have failed. I found many web pages talking about how to CREATE a DLL, but none that explain the minimum code needed in C to access DLL functions. Thanks!

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Salem
0

Sorry for the newb question. I've been browsing around and I learned you need a linker library to use a DLL. So that problem is solved.

Now I just have to figure out how to tell MinGW to look for include files in directories other than it's "include" directory (i.e. "include/notmessy"). Adding the new subdirectory to the Windows PATH doesn't seem to be doing the trick. Grr...

0

I figured out the MinGW paths as well. The options are -I for include path and -L for lib path. For example

-I C:\MinGW\include -L C:\MinGW\lib
0

> Adding the new subdirectory to the Windows PATH doesn't seem to be doing the trick
PATH is for executable files (and scripts IIRC)

You need to make use of the -I and -L command line options for gcc
Eg. gcc -I/path/to/headers -L/path/to/lib prog.c If you're using some kind of IDE, then there should be a place in the "project" settings to specify additional paths.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.