Archived

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

VC.NET Lib Directories Ignored?

This topic is 5625 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

I do all my development on my D: drive, and I have this folder D:\libs for all my downloaded and created libraries that I use frequently. Ok, so I go into Tools -> Options -> Projects -> VC++ Directories and add a Library directory right at the top: d:\libs Now, in one of my projects, I want to statically link with the Win32 PCRE library, which is located at d:\libs\pcre\lib\libpcre.a So, in my project options, under linker -> input -> additional dependencies, along with ws2_32.lib and mswsock.lib, I add pcre\lib\libpcre.a, figuring it''ll search through the Library directories set under Options. No such thing. I keep getting a "can''t open pcre\lib\libpcre.a" error whenever I try to link. If I put "d:\libs\pcre\lib\libpcre.a", it links fine. Is there something I''m doing wrong? wtf is going on here?

Share this post


Link to post
Share on other sites
Hm..I never had linking problems before, but don''t you think it''s supposed to be:

pcre\lib\libpcre.lib

not

pcre\lib\libpcre.a

I don''t know exactly though if it ignores the file extension, but I think it''s worth to try.


My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-

Share this post


Link to post
Share on other sites
I have the same problem when adding DirectX libs. I set both the lib and include paths to the folders in the SDK folder. I also add the lib files in my project settings but it still coughs up errors (oddly enough it only has a problem with the libs as it seems to find the include files without any problems). The only way I could get it to work was by adding the lib files to my project.

Share this post


Link to post
Share on other sites
I always use the full path to the libs location in options->.... and it works fine.

I guess it just doesnt look for files recursively. It never occured to me to think it would.

Regards

BaelWrath

If it is not nailed down it''s mine and if I can prise it loose,
it''s not nailed down!

Share this post


Link to post
Share on other sites
Is libpcre the Perl Reg Ex library? It looks like you''re using the linux / unix a.out library. You need to get the win32 library.

And for the DirectX problems... have you installed the latest platform sdk? The DirectX 8.1 libraries distributed with VS.NET are actually in a subdirectory ''pre-release'' under libs.

Share this post


Link to post
Share on other sites