1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Linking errors, acn somne help me out?

Discussion in 'MFC' started by sangoku, Aug 28, 2010.

  1. sangoku

    sangoku New Member

    Joined:
    Aug 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hy i am fairly new to C++ and i am tinkering with WinBGIm library... and i downloaded the VB 2008 that they offer for download with all the objects and libary...

    Here is the problem when i debug the code ALL is ok it works as it should i have SDK with VB2008 studio dev edition... and while i run the programs on my PC all is ok but when i want to compile it as a release it gives me linking errors that some definitions are mising after i added to the linker the objects:

    bgiout.obj
    dibutil.obj
    drawing.obj
    file.obj
    misc.obj
    mouse.obj
    palette.obj
    text.obj
    winbgi.obj
    winthread.obj

    The linking errors vanished BUT then i had some conflicts with stdlib.. i exclude them from compiling... and on end im stuck on following compiling error...


    #include
    #include
    #include "graphics.h"

    #include

    int main()
    {

    int gdriver = 9;
    int gmode = 2;
    initgraph(&gdriver, &gmode, "");
    setbkcolor(WHITE);
    setcolor(BLACK);//
    cleardevice();
    circle(320,240,10);

    some code
    -
    -
    -

    getchar();
    closegraph();
    return 0;
    }


    The main problem is that it wont compile in release mode..... ANd works 100% in debug mode...


    1>------ Build started: Project: bgi, Configuration: Release Win32 ------
    1>Linking...
    1>Generating code
    1>c:\users\goku\desktop\bgi\dsa.cpp(43) : warning C4700: uninitialized local variable 'linijaX' used
    1>Finished generating code
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x02000019).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.basic_string): (0x0200001a).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x0200001c).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x0200001d).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x0200001e).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x0200001f).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x02000020).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x02000021).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x02000022).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x02000023).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std._Locinfo): (0x02000025).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (_Locimp): (0x0200002a).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x02000036).
    1>MSVCMRT.lib(locale0_implib.obj) : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std._String_val): (0x0200005b).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.logic_error): (0x020000e7).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.basic_string): (0x020000e8).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.domain_error): (0x020000ea).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.invalid_argument): (0x020000eb).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.length_error): (0x020000ec).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.out_of_range): (0x020000ed).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.runtime_error): (0x020000ee).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.overflow_error): (0x020000ef).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.underflow_error): (0x020000f0).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.range_error): (0x020000f1).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std._Locinfo): (0x020000f3).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (_Locimp): (0x020000f9).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (failure): (0x02000105).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std.basic_string): (0x0200011a).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std._String_val): (0x02000134).
    1>dsa.obj : error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (std._String_val): (0x02000138).
    1>LINK : fatal error LNK1255: link failed because of metadata errors
    1>Build log was saved at "file://c:\Users\Goku\Desktop\bgi\Release\BuildLog.htm"
    1>bgi - 31 error(s), 1 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
     

Share This Page