Home
Reply
Contributor
amcom
Posts: 7

Question about SPA_NO_AUTO_LINK

According to this link http://doc.spatial.com/index.php/Compiler_Flags_for_Windows_32-bit_Visual_C%2B%2B_2005_SP1 , SPA_NO_AUTO_LINK needs to be included in both debug and release project settings.

 

In my project, I have no problem for debug version. However, I got linking errors for release version (see below). The errors are gone if I remove SPA_NO_AUTO_LINK from the settings.

 

I am using VS 2005, SP1 and Windows XP, 32 bits.

 

 

 

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class SPAIResult & __thiscall SPAIResult::operator=(long)" (__imp_??4SPAIResult@@QAEAAV0@J@Z) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall SPAIFile::~SPAIFile(void)" (__imp_??1SPAIFile@@UAE@XZ) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall SPAIUnit::~SPAIUnit(void)" (__imp_??1SPAIUnit@@UAE@XZ) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall SPAIResult::operator!=(long)" (__imp_??9SPAIResult@@QAEHJ@Z) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall SPAIUnit::SPAIUnit(enum SPAIUnitValue)" (__imp_??0SPAIUnit@@QAE@W4SPAIUnitValue@@@Z) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall SPAIFile::SPAIFile(char const *)" (__imp_??0SPAIFile@@QAE@PBD@Z) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>CADXToolkit.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall SPAIResult::SPAIResult(long)" (__imp_??0SPAIResult@@QAE@J@Z) referenced in function "public: int __thiscall CCADXToolKit::Execute(char *,char *,char *,char *)" (?Execute@CCADXToolKit@@QAEHPAD000@Z)

1>../bin/IQCADX.dll : fatal error LNK1120: 7 unresolved externals

Contributor
amcom
Posts: 7

Re: Question about SPA_NO_AUTO_LINK

I forgot to put my quesiton in the last post.

 

Is it OK to remove SPA_NO_AUTO_LINK from the project settings?

 

Thanks.

Visitor
hemant
Posts: 3

Re: Question about SPA_NO_AUTO_LINK

hello,

       we are able to reproduce the issue. We have found that this is the case with R21SP3. We are looking more into it. As of now I suggest not to use SPA_NO_AUTO_LINK.

 

Visitor
ameys
Posts: 3

Re: Question about SPA_NO_AUTO_LINK

Hi,

 

We could reproduce issue with Options.We got linking errors "error LNK2019: unresolved external symbol".However to reproduce user scenario we will require your sample project.Can you please create incident and attach sample project?

 

Thanks,

Amey

Visitor
ameys
Posts: 3

Re: Question about SPA_NO_AUTO_LINK

Hi,

 

With Options we are getting following linking errors after setting SPA_NO_AUTO_LINK

 

Error    9    error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall spa_unlock_result::~spa_unlock_result(void)" (__imp_??1spa_unlock_result@@QAE@XZ) referenced in function "void __cdecl unlock_license(void)" (?unlock_license@@YAXXZ)    unlock_license.obj    
Error    10    error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum spa_unlock_state __thiscall spa_unlock_result::get_state(void)const " (__imp_?get_state@spa_unlock_result@@QBE?AW4spa_unlock_state@@XZ) referenced in function "void __cdecl unlock_license(void)" (?unlock_license@@YAXXZ)    unlock_license.obj    
Error    11    error LNK2019: unresolved external symbol "__declspec(dllimport) class spa_unlock_result __cdecl spa_unlock_products(char const *)" (__imp_?spa_unlock_products@@YA?AVspa_unlock_result@@PBD@Z) referenced in function "void __cdecl unlock_license(void)" (?unlock_license@@YAXXZ)    unlock_license.obj    
Error    12    error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl initialize_base(class base_configuration *)" (__imp_?initialize_base@@YAHPAVbase_configuration@@@Z) referenced in function "void __cdecl unlock_license(void)" (?unlock_license@@YAXXZ)    unlock_license.obj    
Error    13    fatal error LNK1120: 4 unresolved externals    .\Debug/Options.exe    

 

These linking errors are diffrent than what you mentioned.So to reproduce exact issue we request you to provide sample project by creating incident.

 

Thanks,

Amey

 

Contributor
amcom
Posts: 7

Re: Question about SPA_NO_AUTO_LINK

Sorry for late response. I was on vacation in last couple weeks.

 

Here is the sample project having link problems in release version. It is a dll to convert a catiav5 file to a iges file.

 

Another question if you can help. I got crash in debug mode after I finish the conversion. It happens when I try to exit the application. It stops at crtexe.c, line 610. Thanks.

 

if( !managedapp )

exit(mainret);

if(has_cctor == 0)

_cexit();