Sign in to follow this  
Drats

Linkage errors

Recommended Posts

Hi I am getting a few linkage errors, and I would be glad if someone could help me out with them. error LNK2019: unresolved external symbol __imp__fputs referenced in function __rwFileSystemOpen error LNK2019: unresolved external symbol __imp__strncat referenced in function __rwStringOpen error LNK2019: unresolved external symbol __imp__ctime referenced in function __rwgetcurrenttime Any ideas which libraries is it asking me for??

Share this post


Link to post
Share on other sites
Could be these?
Quote:

error LNK2019: unresolved external symbol __imp__fputs referenced in function __rwFileSystemOpen

stdio.h
Quote:

error LNK2019: unresolved external symbol __imp__strncat referenced in function __rwStringOpen

string.h

Quote:

error LNK2019: unresolved external symbol __imp__ctime referenced in function __rwgetcurrenttime

time.h

Share this post


Link to post
Share on other sites
Those are all part of the C runtime library.

They are .lib files that start with libc or msvcrt, and are followed by a combination of d (debug) mt (multithreaded) mr (mix managed/native code) and ur (MSIL code).


If you don't specify a C runtime library in your options the linker should automatically link to the proper library for you.


You might have accidentally specified a library version that doesn't match your other compiler options. Search in your project options (the exact page for the options varies by version) and make sure the code generation options are set to he right runtime library.

Share this post


Link to post
Share on other sites
IN code generation I am using MultiThreaded (MT) config. So I added the libraries libcmt.lib to the linker. But that gave me a whole list of new errors which are:

symbol already defined in libcmt.lib.

And the original errors don't go away either.

Share this post


Link to post
Share on other sites

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

Sign in to follow this