Jump to content
Tuts 4 You

Visual Studio 2010 include library???


CodeExplorer

Recommended Posts

Visual Studio 2010 include library:
So I once again have a question:
I need to include:
https://github.com/jmendeth/ccv15/tree/master/libs/poco
I found this info:  https://docs.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?view=vs-2019

So the first thing I do is copy "include folder" to D:\BarsWF-master\Poco
and that thing seems to work just fine.
Now the compiler complains:
1>LINK : fatal error LNK1104: cannot open file 'PocoFoundationmtd.lib'

Already tried Project Properties -> Linker -> Additional Library Directories
No good result!

 

Link to comment

Visual Studio 2010 include library:
So I once again have a question:
I need to include:
https://github.com/jmendeth/ccv15/tree/master/libs/poco
I found this info:  https://docs.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp?view=vs-2019

So the first thing I do is copy "include folder" to D:\BarsWF-master\Poco
and that thing seems to work just fine.
Now the compiler complains:
1>LINK : fatal error LNK1104: cannot open file 'PocoFoundationmtd.lib'

Already tried Project Properties -> Linker -> Additional Library Directories
No good result!

 

Edited by CodeExplorer
Link to comment

Partially got it: I also have to add PocoFoundationmtd.lib to Linker -> Input Additional Dependencies

In the release build I get this:
3>msvcprt.lib(MSVCP100.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in libcpmt.lib(xthrow.obj)
...
3>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
3>D:\BarsWF-master\\out\Release-Win32\barswf_cpu.exe : fatal error LNK1169: one or more multiply defined symbols found
3>
3>Build FAILED.

In the debug build I get this:
3>PocoFoundationmt.lib(Message.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in console_stuff.obj

Those errors break my brain out: specially the msvcprt.lib error!
 

Link to comment

double check the linker includes for the debug and release configuration, you have to edit them for each configuration

C++ can be a pain in the ass at first but it's great when you get used to it

 

Link to comment

I figure it out on what to do with libs files: I simply put them in the project directory!
This works like it should.

Now about the msvcrtd thing:
It has to do with Runtime library option.
Now the problem is the speed of execution: only 5MH/second! (MH = mega hashes)
very slow considering that this is just MD5!
It has bugs: doesn't find MD5(ABCD) = cb08ca4a7bb5f9683c19133a84872ca7
 

Edited by CodeExplorer
Link to comment

You need to make sure that you also included the lib in that same settings window under 'Additional Libraries'.

You can also include it within the source manually via a pragma like this:

#pragma comment(lib, "PocoFoundationmtd.lib")

Long as the path is set properly it should find it without issue. You can also give the pragma the full path to said lib.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...