[gecode-users] compilation without cygwin

victor.zverovich at gmail.com victor.zverovich at gmail.com
Fri Aug 2 15:55:14 CEST 2013


As you've already found out, the generated support/config.hpp disables
autolink by defining GECODE_BUILD_*. There might be a better way to do this
which I don't know about.

I'm not sure why you get LNK1107, have you tried to check if gecodeint.lib
is a valid library using dumpbin or lib?

Best regards,
Victor


On Fri, Aug 2, 2013 at 1:26 AM, kTorpi <ktorpi at gmail.com> wrote:

> How could I disable autolink? The cmake generated support/config.hpp says:
>
> /* Disable autolink because all the dependencies are handled by CMake. */
> #define GECODE_BUILD_SUPPORT
> #define GECODE_BUILD_KERNEL
> #define GECODE_BUILD_SEARCH
> ...
>
> but at linkage I get the following error: gecodeint.lib : fatal error
> LNK1107: invalid or corrupt file: cannot read at 0x2A0
> I think it want link these libs like import libs, so may be autolink isn't
> disabled.
>
> Thanks,
> Steve
>
>
> 2013/7/31 victor.zverovich at gmail.com <victor.zverovich at gmail.com>
>
> The names of the libraries produced by the CMake build do not have
>> version/platform suffix such as "-4-1-0-d-x86" although it is not too
>> difficult to implement (patches are welcome =)). Therefore you have to
>> specify the libraries manually when linking and not rely on autolink (or
>> change the CMake script to produce these suffixes).
>>
>> Best regards,
>> Victor
>>
>>
>> On Wed, Jul 31, 2013 at 2:21 AM, kTorpi <ktorpi at gmail.com> wrote:
>>
>>> Thanks Victor! It almost works. :)
>>> I generated VS 10.0 build files with cmake, and I could build static
>>> gecode libs with it, which is exactly what I need. But I have a problem
>>> with linking these libs with my application. This build process generetes
>>> only a support/config.hpp file. I copied this file into gecode/support dir
>>> which I founded in the downloaded source of gecode, and I used this dir
>>> (gecode dir) as the includes
>>>  directory.
>>> My program compiles this way, but during linkage I get "cannot open file
>>> 'GecodeSupport-4-1-0-d-x86.lib'" message, which is no wonder cause the
>>> builded gecode libs has named like "gecodesupport.lib". I tried to rename
>>> the .lib files (concat version, architecture and r/d information) and also
>>> hacked the support/auto-link.hpp file, but no success, linker complains
>>> about bad lib format.
>>> Any ideas?
>>>
>>> Thanks in advance,
>>> Steve
>>>
>>>
>>> 2013/7/26 victor.zverovich at gmail.com <victor.zverovich at gmail.com>
>>>
>>> You can build Gecode with cl/Visual C++ using CMake. This doesn't
>>>> require Cygwin.
>>>>
>>>> HTH,
>>>> Victor
>>>> On Jul 25, 2013 4:21 PM, "kTorpi" <ktorpi at gmail.com> wrote:
>>>>
>>>>>  Hi,
>>>>>
>>>>> Thank you, but I don't think so.
>>>>> I'd like to compile the gecode itself. In Section 2.6.2 it is
>>>>> mentioned, that "For Windows, we require Cygwin environment...", but I'd
>>>>> like to compile gecode without it.
>>>>>
>>>>> Thank you,
>>>>> Steve
>>>>>
>>>>>
>>>>> 2013/7/24 Gustavo Gutierrez <gustavo.ggutierrez at gmail.com>
>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Jul 24, 2013 at 8:37 AM, kTorpi <ktorpi at gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Is there someone who tried to compile gecode under windows without
>>>>>>> using cygwin? I'd like to compile it with cl natively somehow. Is it
>>>>>>> possible?
>>>>>>>
>>>>>>>
>>>>>> Seems like section 2.3.1 of the following document is what you are
>>>>>> looking for.
>>>>>>
>>>>>> http://www.gecode.org/doc-latest/MPG.pdf
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Gustavo Gutierrez
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Gecode users mailing list
>>>>> users at gecode.org
>>>>> https://www.gecode.org/mailman/listinfo/gecode-users
>>>>>
>>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130802/3d709db4/attachment.html>


More information about the users mailing list