[gecode-users] Linking Error Involving GecodeSupport-3-3-1-r-x86.lib

Christian Schulte cschulte at kth.se
Wed Jun 16 19:01:15 CEST 2010


Sorry: should I add this as a tip to MPG? And also, mention on  the download
page?

 

What do you think?

 

Christian

 

--

Christian Schulte, web.ict.kth.se/~cschulte/

 

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Christian Schulte
Sent: Wednesday, June 16, 2010 6:54 PM
To: 'Dan Scott'; users at gecode.org
Subject: Re: [gecode-users] Linking Error Involving
GecodeSupport-3-3-1-r-x86.lib

 

Hi,

 

As the MSVC compiler tells you, you are using a 32 bit compiler (x86 in
Microsoft speak) to link against a 64 bit library (x64 in Microsoft speak).
It does not matter what your operating system is but what compiler you use
when you decide which version of Gecode to install (x64 or x86).

 

As Gecode uses auto linking, the x86 compiler you are using tries to find
the x86 library which does not exist on your system.

 

You have two options now:

1.       Install Gecode for x86 and keep your compiler for x86.

2.       Enable the x64 compiler and keep Gecode for x64 .

 

Step 2. might be tricky if you have the Visual Studio Express Edition only
as it is only x86. If you have a commercial version you can enable x64 (but
I am not so sure how to do it in MSVC's IDE).

 

Hope that helps

Christian

 

--

Christian Schulte, web.ict.kth.se/~cschulte/

 

 

From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Dan Scott
Sent: Wednesday, June 16, 2010 6:45 PM
To: users at gecode.org
Subject: [gecode-users] Linking Error Involving
GecodeSupport-3-3-1-r-x86.lib

 

Hi,

I am a (very) new Gecode user.  I am trying to compile and run the
send-more-money.cpp example following the direction in section 2.3.1 of the
"Modeling and Programming with Gecode" guide.  I am using Gecode 3.3.1 that
I installed from Gecode-3.3.1-x64.msi, and I am running under Windows XP
Professional x64 Edition, using Visual Studio 2008.

 

When I compiled send-more-money.cpp I had some minor issues with specifying
the correct include directories, but I dealt with that okay, and
successfully created send-more-money.obj.  But, I cannot seem to get the
linking to work, as it complains that it is unable to open
GecodeSupport-3-3-1-r-x86.lib  That file does not exist on my system.
Instead, I have GecodeSupport-3-3-1-r-x64.lib, which makes sense.  But why
isn't it trying to link against *this* file?  How can I correct this?  Do I
need to be changing some commands to make it aware of the fact that this is
a 64-bit system, or something?

 

The command line compiling and linking text is reproduced below (sorry about
the lousy line breaks.)

 

Thanks for any assistance,

-Dan-

 

 

Compiling (This seemed to work okay, but I thought it might possibly be
relevant):

---------------

 

D:\Installs\Gecode>cl /DNDEBUG /EHsc /MD /Ox /wd4355 -I"%GECODEDIR%\include"
-I"

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" -I"C:\Program
Fil

es\Microsoft SDKs\Windows\v6.1\Include" -c -Fosend-more-money.obj
-Tpsend-more-m

oney.cpp

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for
80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

 

send-more-money.cpp

 

 

Linking (Here is where the error occurred):

-----------

 

D:\Installs\Gecode>cl /DNDEBUG /EHsc /MD /Ox /wd4355 -I"%GECODEDIR%\include"
-Fe

send-more-money.exe send-more-money.obj /link /LIBPATH:"%GECODEDIR%\lib"
/LIBPAT

H:"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib"

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for
80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

 

Microsoft (R) Incremental Linker Version 9.00.30729.01

Copyright (C) Microsoft Corporation.  All rights reserved.

 

/out:send-more-money.exe

"/LIBPATH:C:\Program Files\Gecode\\lib"

"/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib"

send-more-money.obj

LINK : fatal error LNK1104: cannot open file 'GecodeSupport-3-3-1-r-x86.lib'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20100616/86c74bb5/attachment.htm>


More information about the users mailing list