Saturday, August 3, 2013

Teamcenter 9.1: Compiling Issues

Symptom:
------ Build started: Project: Phi4_BOMExport, Configuration: Debug Win32 ------
Compiling...
cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
Phi4_BOMExport.cxx
Linking...
C:\Program Files\Siemens\TC9\Teamcenter9\lib\itk_main.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Build log was saved at "file://c:\Users\Admin\Desktop\Bom List all child\Phi4_BOMExport\Phi4_BOMExport\Debug\BuildLog.htm"
Phi4_BOMExport - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Teamcenter 9.1: Can not Compile and Link in (64bit version)

  • I was trying to build using Teamcenter 9.1 libraries. So I encountered linking errors. I searched GTAC and I found the following PR which has no solution. 
  • I have found a solution for this PR.
  • Symptom
  • Problem/Questions/Request:Problem When compile error is occur to build in the "-64bit" option of Tc9.1 (64bit version). This message is displayed when you compile.
  • fatal error C1189: #error : Sorry, you have to change unidefs.h to make this work on this machine.
  • Therefore, result of changing the "unidefs.h", was able to compile. However, link error occurs. sample.obj: error LNK2019: External symbol "__imp__ITEM_find_item" unresolved was referenced in function "_sample_validate_item_rev_id" sample.obj: error LNK2019: External symbol "__imp__CUSTOM_register_exit" unresolved was referenced in function "_sample_register_callbacks" sample.dll: LNK1120 fatal error: external reference 2 is unresolved.
  • Solution:
  • 1. Install X64 bit compilers in visual studio.
  • 2. Restart your machine.
  • 3. open TC command prompt and go to MSDEV_HOME.
  • 4. Type this: call vcvarsall amd64
  • 5. compile using compile.bat.
  • More Details: click here.