From: David E. <gc...@ya...> - 2008-10-25 19:01:04
|
--- On Fri, 10/24/08, Brian Dessent <br...@de...> wrote: > From: Brian Dessent <br...@de...> > Subject: Re: [Mingw-users] newbie - can't get include and libs to work > To: "MinGW Users List" <min...@li...> > Date: Friday, October 24, 2008, 10:10 PM > David Eaton wrote: > > > Obviously there is no main there - main occurs in a > large .c file and to try to compile it requires compiling > everything, and everyone has indicated I need to get this to > work on a single file first. > > You need to take a step back and understand that the above > makes no > logical sense. > > You are currently instructing gcc to both compile and link > an > executable. This is not possible without a main() > entrypoint. If you > want to compile but not link, then you need -c. But that > would not > really test that you have a working setup because without > linking no > libraries are ever searched because the linker is never > invoked. You > would just have some object files, which are useless on > their own until > they are linked. > > What people suggested was that you should try a simple > standalone > testcase -- whatever the "hello world" equivalent > for the libusb API is > -- not that you can expect anything meaningful from > compiling only part > of a larger project. > > Brian > First off, please forgive me for all of my previous top-posts. I didn't know what that meant until someone pointed me in the right direction. I did get my entire big process to compile and link. The only way it would find libusb.a is by eventually just forcing it as follows: gcc *.c /libusb/lib/gcc/libusb.a -o dwetest -Ic:/libusb/include/ I'm HOPING that when it comes time I need to add the GTK libs as well that there is some syntax to be able to list multiple search paths. If anyone has done anything like the above but with multiple libraries and multiple include paths, please post back some hints. In the mean time, thanks VERY MUCH to everyone who helped provide a solution for me! Dave :) |