Jump to content
  • Advertisement
Sign in to follow this  
Quak

link library

This topic is 5116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i'm using VC++ 6 and want to link a library to my programm thats not in the compiler's directory. I searched the help section but couldn't find an answer. thanks

Share this post


Link to post
Share on other sites
Advertisement
You'll have to add the library's path to VC's library search path. I don't remember how to do it, though. Look for an option with a name like "Directories".

Share this post


Link to post
Share on other sites
It's been a while since I've used VC6 but it something like Tools->Options->Directories.

Once you have the right page you'll need to change the drop down option to "library files", you can then add a new search path for the lib files.

Share this post


Link to post
Share on other sites
Thanks, it's working. But I still get 2 unresolved errors.
Is it possible that the linker uses the library in his native directory rather then mine(which have the same name)? I'm trying to link ddraw.lib to my project...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Put the link right at the top, cuase it seems your using directx. If you dont put it at the top youre basically saying use directx3.0

Share this post


Link to post
Share on other sites
Linking...
blackbox.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Release/freakout.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

This is the error. I've included ddraw.lib only.
A problem seems to be that in both directorys, the default one and the one I've added contains a ddraw.lib.

Share this post


Link to post
Share on other sites
Quote:
Original post by Quak
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main


generally this comes from having the project settings be for a console app, but you're actually coding a windows app. if you have a WinMain in your program you need to change the settings (don't remember how) such that the project knows it's a windows app. if you have neither a main nor a winmain you need one or the program won't know how to run.

-me

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!