Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link error in Debug configuration #166

Open
mind6 opened this issue Jun 17, 2024 · 0 comments
Open

Link error in Debug configuration #166

mind6 opened this issue Jun 17, 2024 · 0 comments

Comments

@mind6
Copy link

mind6 commented Jun 17, 2024

I'm on Windows using MSVC. The Julia and compiler versions are the same as in the CI workflows. I get a link error when compiling the libcxxwrap-julia/examples/ directory, using latest version 0.13.2 under Debug configuration.

[build]   test_module.vcxproj -> C:\Users\kirby\MyDrive\Documents\TWS_API\build\bin\test_module.exe
[build]      Creating library C:/Users/kirby/MyDrive/Documents/TWS_API/build/libcxxwrap-julia/examples/Debug/functions.lib and object C:/Users/kirby/MyDrive/Documents/TWS_API/build/libcxxwrap-julia/examples/Debug/functions.exp
[build] functions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl jlcxx::detail::BasicArg<0>::BasicArg<0>(char const *)" (__imp_??0?$BasicArg@$0A@@detail@jlcxx@@QEAA@PEBD@Z) referenced in function init_test_module [C:\Users\kirby\MyDrive\Documents\TWS_API\build\libcxxwrap-julia\examples\functions.vcxproj]
[build] functions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl jlcxx::detail::BasicArg<1>::BasicArg<1>(char const *)" (__imp_??0?$BasicArg@$00@detail@jlcxx@@QEAA@PEBD@Z) referenced in function init_test_module [C:\Users\kirby\MyDrive\Documents\TWS_API\build\libcxxwrap-julia\examples\functions.vcxproj]
[build] C:\Users\kirby\MyDrive\Documents\TWS_API\build\bin\libfunctions.dll : fatal error LNK1120: 2 unresolved externals [C:\Users\kirby\MyDrive\Documents\TWS_API\build\libcxxwrap-julia\examples\functions.vcxproj]

But everything compiles in Release configuration.

I'm also getting a link error compiling my own library, in either Debug or Release configuration. The library previously worked under version 0.12.x

[build] Dll.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::unordered_map<struct std::pair<class std::type_index,unsigned __int64>,struct jlcxx::CachedDatatype,struct std::hash<struct std::pair<class std::type_index,unsigned __int64> >,struct std::equal_to<struct std::pair<class std::type_index,unsigned __int64> >,class std::allocator<struct std::pair<struct std::pair<class std::type_index,unsigned __int64> const ,struct jlcxx::CachedDatatype> > > & __cdecl jlcxx::jlcxx_type_map(void)" (__imp_?jlcxx_type_map@jlcxx@@YAAEAV?$unordered_map@U?$pair@Vtype_index@std@@_K@std@@UCachedDatatype@jlcxx@@U?$hash@U?$pair@Vtype_index@std@@_K@std@@@2@U?$equal_to@U?$pair@Vtype_index@std@@_K@std@@@2@V?$allocator@U?$pair@$$CBU?$pair@Vtype_index@std@@_K@std@@UCachedDatatype@jlcxx@@@std@@@2@@std@@XZ) referenced in function "private: void __cdecl jlcxx::Module::add_copy_constructor<struct TagValue>(struct _jl_datatype_t *)" (??$add_copy_constructor@UTagValue@@@Module@jlcxx@@AEAAXPEAU_jl_datatype_t@@@Z) [C:\Users\kirby\MyDrive\Documents\TWS_API\build\TestCppClientLib.vcxproj]

I noticed in version 0.13 there have been changes around type maps, but I cannot understand the code so I have no way to narrow down the issue further.

barche added a commit that referenced this issue Jun 21, 2024
barche added a commit that referenced this issue Jun 21, 2024
barche added a commit that referenced this issue Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant