link library
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
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".
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.
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.
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...
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...
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
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.
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.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement