Link error when building 64-bit OpenSees on Windows

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
geyas
Posts: 7
Joined: Fri Dec 17, 2010 10:30 am
Location: HIT

Link error when building 64-bit OpenSees on Windows

Post by geyas »

Hi,
I tried to building 64-bit OpenSees on a 64-bit Windows machine, but failed due to the error:

libm.lib(isnan.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

This error occurs both in building Project OpenSees and OpenSeesTk.

I've searched this issue and find some relevant pages, but none of them really solves it.
http://stackoverflow.com/questions/3563 ... achine-typ
http://opensees.berkeley.edu/community/ ... bit#p99005
http://opensees.berkeley.edu/community/ ... bit#p99213
http://opensees.berkeley.edu/community/ ... =4&t=62052 (same problem with mine)

What I have done are:
1. Install a 64-bit tcl, and use the sourcecode of OpenSees 2.4.5;
2. In VS2012, change the solution platform to x64/Debug in all the projects, and set the target machine to "MachineX64 (/MACHINE:X64)";
3. Try to build a new 64-bit project using VS2012 and succeed.
4. Check the "VC++ Directionaries" in "Project/ Properties" page, and all the directionaries are already changed to 64-bit, such as "$(VCInstallDir)lib\amd64";
5. Try to use old versions of OpenSees sourcecode, and the same error occurs.

6. "libm.lib" is an existing file in "\Win32\lib\", and I find that it's a lib just for 32-bit by checking it's head values (14C machine x86 ). I'm wondering if it is the point, but don't know where to get a "libm.lib" for 64-bit.

Does anyone successfully build the 64-bit OpenSees on Windows? And Could you help me solve this problem?
blaiman
Posts: 56
Joined: Wed Jul 11, 2012 11:59 am
Location: RISA Tech, Inc.

Re: Link error when building 64-bit OpenSees on Windows

Post by blaiman »

Never knew there was a capability now of compiling a 64-bit version. But you might want to try uninstalling the 64-bit tcl and then installing the 32-bit and then compiling everything in 32-bit in Visual Studio. Is there any particular reason why you would want to compile and do your development in a 64-bit environment.
Brighton Laiman
Development Engineer
RISA Technologies
Foothill Ranch, CA
geyas
Posts: 7
Joined: Fri Dec 17, 2010 10:30 am
Location: HIT

Re: Link error when building 64-bit OpenSees on Windows

Post by geyas »

That's a pity. Maybe I should just stick on the 32-bit version. But still thank you.
gunmo
Posts: 8
Joined: Sun Dec 28, 2014 7:30 am
Location: UK Edinburgh

Re: Link error when building 64-bit OpenSees on Windows

Post by gunmo »

My case, once, It was successful after struggling several days with helps from others.
but it went back to a bunch of errors again after SVN update.
Post Reply