Archived

This topic is now archived and is closed to further replies.

mrbastard

Help I'm in linking hell!

Recommended Posts

Hi there, I''m trying to link to a lib in Visual C++ 6. I''ve got the header and lib added to the project and the lib added to project>settings->link. I keep getting unresolved externals tho! Can anyone help by by pointing out the (probably very simple and stupid) mistake I''ve made? Thanks Dan Groom

Share this post


Link to post
Share on other sites
Hmmm. Is it a custom library or some common library?

Normally all you would need to do is add it to project->settings->link and it should work fine. My best guess is that the library you are adding is not the only one you need added. Alot of times libraries are co-dependant with other libraries.

Seeya
Krippy

Share this post


Link to post
Share on other sites
Thanks for the reply.

Its a custom lib. Its Carl J Nobile's Doubley Linked List API from here . It comes as a .h and a .h , which I made into a lib.

I'm now trying to use the lib and the .h in a seperate OpeGL project.

If it was dependant on other libs, wouildn't this have shown up and been resolved when I made it into a lib ?

The only other librarys it needs are stdio.h stdlib.h and string.h .



(link corrected)

Edited by - mrbastard on June 29, 2001 12:44:54 PM

Share this post


Link to post
Share on other sites
You cant convert ©h files to libraries©©© they have no executable code except for definitions and inline functions© You need to get the library source and compile it and link it©©© I blame the books for telling people that if you include an header you automatically get a working function without any objects or libraries being linked© You cannot just copy a ©h file to a ©lib file or you will end up with a currupt library©©© mmkay?

Share this post


Link to post
Share on other sites
SmasKenS: yep its in the same dir as the project.


CorsairK8: Yeah, I know. Tho as my last post aint too clear (an .h and a .h...) you are forgiven for thinking I am a dumbass. Mmkay?

I''ve tried compiling/linking using the original source and header files as well (no luck). The functions that it can''t resolve are declared in the .h defined in the .c so I really have no idea....

BTW I''m using the LL API cos it''s supposed to be stable and efficient. (saves me writing my own crappier version too!)

The API comes as dll_main.h , dll_main.c , dll_debug.h (which I''m ignoring and doing a release build to save hassle) and linklist.h, which I''m not sure about. I''ve tried using linklist.h as the header for the lib insted of dll_main.h but no luck...

Thanks for replying everbody!

Share this post


Link to post
Share on other sites