Cancel
Showing results for 
Search instead for 
Did you mean: 

BMIDE (TC12) configuration for use with Visual Studio 2017

Valued Contributor
Valued Contributor

Hallo everybody.

 

I am moving from TC10.1.7 to TC12. I've just succesfully updated my custom data model, and I'm trying to update also some codeful customizations.

OS is windows server 2016, equipped with MS Visual Studio 2017 pro (14.14.26428) and win SDK 14.0.14393.0.

 

I modified "bmide_generatecode.bat" adding line "set TC_BIN=%TC_ROOT%\bin"

I also modified "bmide.bat" adding thse lines:

 

call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\vsdevcmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.14393.0
set MSDEV_HOME=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428

 

I did this because in VS2017 command line environment variables settins is a bit changed with respect to VS2010SP1.

 

IN BMIDE also I added includes to 

${TC_ROOT}\include
${TC_ROOT}\include_cpp
${MSDEV_HOME}\include

 

BMIDE project compiles succesfully, but when it comes to linking I got a number of LNK2019 errors "unresolved external symbol" relating to "msvcrt.lib" and "*.obj" files of my project.

 

Seems that the way of configuring BMIDE for working with MS visual studio 2017 has changed... But I really don't know what to do at this point.

 

Any suggestions?

 

Thanks

 

Stefano Garbin

CAD, CAE & PLM manager

www.campagnolo.com
5 REPLIES 5

Re: BMIDE (TC12) configuration for use with Visual Studio 2017

Siemens Genius Siemens Genius
Siemens Genius

Depends on what symbol is missing.

 

in my environment I have added vcruntime.lib ucrt.lib in my makefile.wntx64

SYSLIBS            = msvcrt.lib msvcprt.lib kernel32.lib vcruntime.lib ucrt.lib

 

Kind regards

Svatos

Re: BMIDE (TC12) configuration for use with Visual Studio 2017

Valued Contributor
Valued Contributor

Thanks Svatos, with your suggestions now it's going much better.

Anyway unfotunately still only one error remains (unresolved external on ___declspec(dllimport))

 

The exact error is:

 

Creating library C:\Siemens\Teamcenter12\tcroot\bmide\workspace\12000.0.0\campagnolo\output\wntx64\lib\libCm4_specifiche_mgmt.lib and object C:\Siemens\Teamcenter12\tcroot\bmide\workspace\12000.0.0\campagnolo\output\wntx64\lib\libCm4_specifiche_mgmt.exp
Cm4_Campy_codiceRevisionGenImpl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Teamcenter::getStringOperationDispatcher::getStringBaseAction(class Teamcenter::BusinessObject const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool &)const " (__imp_?getStringBaseAction@getStringOperationDispatcher@Teamcenter@@QEBAXPEBVBusinessObject@2@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEA_N@Z) referenced in function "public: int __cdecl campagnolo::Cm4_Campy_codiceRevisionGenImpl::getCm4_lista_specifiche(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool &)const " (?getCm4_lista_specifiche@Cm4_Campy_codiceRevisionGenImpl@campagnolo@@QEBAHAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEA_N@Z)
C:\Siemens\Teamcenter12\tcroot\bmide\workspace\12000.0.0\campagnolo\output\wntx64\lib\libCm4_specifiche_mgmt.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.EXE"' : return code '0x460'
Stop.

 

Another question: I added manually to makefile.wnt64 the two libraries you told before. Is there a way to make them added automatically during makefile generation?

 

thanks

 

Stefano Garbin

CAD, CAE & PLM manager

www.campagnolo.com
Highlighted

Re: BMIDE (TC12) configuration for use with Visual Studio 2017

Siemens Genius Siemens Genius
Siemens Genius

I belive the missed function is in libextensionframework.lib, try to add it to depends on library list.

 

For automatic addition of system libraries is a possibility there to define them as third party library for BMIDE project.

I did not so, because it is not easy to manage such changes in different environments and I suppose that the libraries shall be added by Teamcenter itself.

 

Svatos

Re: BMIDE (TC12) configuration for use with Visual Studio 2017

Valued Contributor
Valued Contributor

GREAT!

Problem solved!

 

Many many thanks!

Stefano Garbin

CAD, CAE & PLM manager

www.campagnolo.com

Re: BMIDE (TC12) configuration for use with Visual Studio 2017

Legend
Legend

@stefano_garbin wrote:

Thanks Svatos, with your suggestions now it's going much better.

Anyway unfotunately still only one error remains (unresolved external on ___declspec(dllimport))

 

The exact error is:

 

Creating library C:\Siemens\Teamcenter12\tcroot\bmide\workspace\12000.0.0\campagnolo\output\wntx64\lib\libCm4_specifiche_mgmt.lib and object C:\Siemens\Teamcenter12\tcroot\bmide\workspace\12000.0.0\campagnolo\output\wntx64\lib\libCm4_specifiche_mgmt.exp
Cm4_Campy_codiceRevisionGenImpl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl Teamcenter::getStringOperationDispatcher::getStringBaseAction(class Teamcenter::BusinessObject const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool &)const " (__imp_?getStringBaseAction@getStringOperationDispatcher@Teamcenter@@QEBAXPEBVBusinessObject@2@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEA_N@Z) referenced in function "public: int __cdecl campagnolo::Cm4_Campy_codiceRevisionGenImpl::getCm4_lista_specifiche(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool &)const " (?getCm4_lista_specifiche@Cm4_Campy_codiceRevisionGenImpl@campagnolo@@QEBAHAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEA_N@Z)
C:\Siemens\Teamcenter12\tcroot\bmide\workspace\12000.0.0\campagnolo\output\wntx64\lib\libCm4_specifiche_mgmt.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.EXE"' : return code '0x460'
Stop.

 

Another question: I added manually to makefile.wnt64 the two libraries you told before. Is there a way to make them added automatically during makefile generation?

 

thanks

 


You can add extra libraries in the BMIDE to the linker flags in the Build configuration of the project

Then they get automatically added to the makefile (it does so with TC11.3)