Porting DevIL on cmake

Developers
Ludovic
2011-10-27
2013-05-02
  • Ludovic
    Ludovic
    2011-10-27

    Hi,

    I need different versions of DevIL to work with VS (2005 and 2010). As there is no version available for 2010 (or did not find it) I have started to create a cmake to build the devil's dlls. The project is ready, but I have a few link (project properties?) problems…

    As there is no lib files for the 3rd party libraries, I have downloaded them and compiled them. At the moment the compilation of all the libs is fine.

    However, when I try to link DevIL's project with VS2005 (I try to compare the compilation/link by replacing the .lib that can be downloaded on the website for VS2005 first), I have a link error. At the moment zlib.lib links fine, but when I replace libjpeg.lib with the one I have generated, I have the following errors;

    1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
    1>libjpeg_vc80_x86_d.lib(jdhuff.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    1>libjpeg_vc80_x86_d.lib(jcapimin.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order7
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order7
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order7
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order6
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order6
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order6
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order5
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order5
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order5
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order4
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order4
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order4
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order3
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order3
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order3
    1>libjpeg_vc80_x86_d.lib(jdmarker.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order2
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order2
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jpeg_natural_order2
    1>libjpeg_vc80_x86_d.lib(jdinput.obj) : error LNK2019: unresolved external symbol _jdiv_round_up referenced in function _jpeg_core_output_dimensions
    1>libjpeg_vc80_x86_d.lib(jdmaster.obj) : error LNK2001: unresolved external symbol _jdiv_round_up
    1>libjpeg_vc80_x86_d.lib(jcmaster.obj) : error LNK2001: unresolved external symbol _jdiv_round_up
    1>libjpeg_vc80_x86_d.lib(jquant1.obj) : error LNK2001: unresolved external symbol _jzero_far
    1>libjpeg_vc80_x86_d.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol _jzero_far referenced in function _access_virt_sarray
    1>libjpeg_vc80_x86_d.lib(jccoefct.obj) : error LNK2001: unresolved external symbol _jzero_far
    1>libjpeg_vc80_x86_d.lib(jdcoefct.obj) : error LNK2001: unresolved external symbol _jzero_far
    1>libjpeg_vc80_x86_d.lib(jquant2.obj) : error LNK2001: unresolved external symbol _jzero_far
    1>libjpeg_vc80_x86_d.lib(jccoefct.obj) : error LNK2019: unresolved external symbol _jround_up referenced in function _jinit_c_coef_controller
    1>libjpeg_vc80_x86_d.lib(jdcoefct.obj) : error LNK2001: unresolved external symbol _jround_up
    1>libjpeg_vc80_x86_d.lib(jdpostct.obj) : error LNK2001: unresolved external symbol _jround_up
    1>libjpeg_vc80_x86_d.lib(jdsample.obj) : error LNK2001: unresolved external symbol _jround_up
    1>libjpeg_vc80_x86_d.lib(jdmerge.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    1>libjpeg_vc80_x86_d.lib(jcprepct.obj) : error LNK2019: unresolved external symbol _jcopy_sample_rows referenced in function _expand_bottom_edge
    1>libjpeg_vc80_x86_d.lib(jcsample.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    1>libjpeg_vc80_x86_d.lib(jdsample.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    1>libjpeg_vc80_x86_d.lib(jdcolor.obj) : error LNK2001: unresolved external symbol _jcopy_sample_rows
    1>libjpeg_vc80_x86_d.lib(jdcoefct.obj) : error LNK2019: unresolved external symbol _jcopy_block_row referenced in function _decompress_smooth_data
    

    It seems that the link manage to find the first level of funtions (_decompress_smooth_data, _expand_bottom_edge, etc) but not the libjpeg functions called inside these functions… I have a similar problem with some of the other libs…

    I think I miss something when I generate these libs, does anyone have an idea?

    Cheers,

    Ludovic