Thread: RE: [Dev-C++] Problem linking in library
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <ech...@ne...> - 2002-04-08 21:09:41
|
> Hello, > I am very new to Dev-C++ so excuse my ignorance. I've been blindly > using the big money C++ compiler, but now I'm better. > Here is my deal. > > I have a gui development library that utilizes opengl and glut that I > want to link into my appication. > Here are the steps I took. > > 1. Compiled the library > 2. Developed an archive file from the object files using the command > line gcc archive command (ar -ru lib.a *.o). > 3. Created a new project that links in -lopengl32 -lglu32 -lglut32 and > lib.a. (I put this in Further object files section of the project > options window). I believe that libraries for gcc are suposed to be named lib<name>.a ie libgl.a, libc.a, ... and then are linked by -l<name> -lgl -lc ... So you might want to try naming the file libsomething.a Changing this might be resolve the error. Evan > 4. Attempted to compile my application > > When Dev-C++ attempts to link in the library it gives me an "undefined > reference to `opengl function' error. > It's almost as if it doesn't know where to find the opengl functions > that I included. > > If I put the whole library source code into my project I can compile, > link, and run the project without a hitch. > > Any clues as to what I'm doing wrong? > > Thanks for you help. > Bobby __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ |
|
From: <ech...@ne...> - 2002-04-10 15:44:49
|
"Robert Landle" <rl...@gd...> wrote: > >Hi, >I tried this and it didn't seem to make a difference. It's weird >because the linker is finding the library >it just doesn't know how to process the opengl commands found in my >library. Even though I am including >the opengl libraries in my main program! > >I've found some information on libtool on the web, but it didn't come >with the mingW32 compiler stuff. >Anyone have an idea where I can go to get a copy that will run with my >version of Dev-C++ (4.01)? >Thanks again, >Bobby > I haven't used libtool, but mabey you could try compiling your lib as a dll, using dev-c++ (new Project -> dll)? I an't think of a reason why it would make a difference, but who knows, it might work? Evan >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...] On Behalf Of Evan >Hempel <ech...@ne...> >Sent: Monday, April 08, 2002 5:09 PM >To: "Dev-C++" >Cc: "Robert Landle" >Subject: RE: [Dev-C++] Problem linking in library > > >> Hello, >> I am very new to Dev-C++ so excuse my ignorance. I've been blindly >> using the big money C++ compiler, but now I'm better. >> Here is my deal. >> >> I have a gui development library that utilizes opengl and glut that >I >> want to link into my appication. >> Here are the steps I took. >> >> 1. Compiled the library >> 2. Developed an archive file from the object files using the >command >> line gcc archive command (ar -ru lib.a *.o). >> 3. Created a new project that links in -lopengl32 -lglu32 -lglut32 >and >> lib.a. (I put this in Further object files section of the project >> options window). > >I believe that libraries for gcc are suposed to be named lib<name>.a ie >libgl.a, libc.a, ... and then are linked by -l<name> -lgl -lc ... So >you might want to try naming the file libsomething.a Changing this >might be resolve the error. > > >Evan > >> 4. Attempted to compile my application >> >> When Dev-C++ attempts to link in the library it gives me an >"undefined >> reference to `opengl function' error. >> It's almost as if it doesn't know where to find the opengl functions >> that I included. >> >> If I put the whole library source code into my project I can >compile, >> link, and run the project without a hitch. >> >> Any clues as to what I'm doing wrong? >> >> Thanks for you help. >> Bobby > > >__________________________________________________________________ >Your favorite stores, helpful shopping tools and great gift ideas. >Experience the convenience of buying online with Shop@Netscape! >http://shopnow.netscape.com/ > >Get your own FREE, personal Netscape Mail account today at >http://webmail.netscape.com/ > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >Sponsored by http://www.ThinkGeek.com/ > > > __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ |
|
From: Robert L. <rl...@gd...> - 2002-04-09 13:40:08
|
Hi, I tried this and it didn't seem to make a difference. It's weird because the linker is finding the library it just doesn't know how to process the opengl commands found in my library. Even though I am including the opengl libraries in my main program! I've found some information on libtool on the web, but it didn't come with the mingW32 compiler stuff. Anyone have an idea where I can go to get a copy that will run with my version of Dev-C++ (4.01)? Thanks again, Bobby -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Evan Hempel <ech...@ne...> Sent: Monday, April 08, 2002 5:09 PM To: "Dev-C++" Cc: "Robert Landle" Subject: RE: [Dev-C++] Problem linking in library > Hello, > I am very new to Dev-C++ so excuse my ignorance. I've been blindly > using the big money C++ compiler, but now I'm better. > Here is my deal. > > I have a gui development library that utilizes opengl and glut that I > want to link into my appication. > Here are the steps I took. > > 1. Compiled the library > 2. Developed an archive file from the object files using the command > line gcc archive command (ar -ru lib.a *.o). > 3. Created a new project that links in -lopengl32 -lglu32 -lglut32 and > lib.a. (I put this in Further object files section of the project > options window). I believe that libraries for gcc are suposed to be named lib<name>.a ie libgl.a, libc.a, ... and then are linked by -l<name> -lgl -lc ... So you might want to try naming the file libsomething.a Changing this might be resolve the error. Evan > 4. Attempted to compile my application > > When Dev-C++ attempts to link in the library it gives me an "undefined > reference to `opengl function' error. > It's almost as if it doesn't know where to find the opengl functions > that I included. > > If I put the whole library source code into my project I can compile, > link, and run the project without a hitch. > > Any clues as to what I'm doing wrong? > > Thanks for you help. > Bobby __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users Sponsored by http://www.ThinkGeek.com/ |