RenderKit / embree

Embree ray tracing kernels repository.
Apache License 2.0
2.32k stars 383 forks source link

Error LNK2019 unresolved external symbol "public: bool __cdecl embree::Geometry::pointQuery #452

Open camvinh opened 1 year ago

camvinh commented 1 year ago

Anyone can help me, which lib missing? Error LNK2019 unresolved external symbol "public: bool __cdecl embree::Geometry::pointQuery(struct embree::PointQueryK<1> ,struct embree::PointQueryContext )" (?pointQuery@Geometry@embree@@QEAA_NPEAU?$PointQueryK@$00@2@PEAUPointQueryContext@2@@Z),function"public: static bool __cdecl embree::avx2::ObjectIntersector1<1>::pointQuery(struct embree::PointQueryK<1> ,struct embree::PointQueryContext ,struct embree::Object const &)" (?pointQuery@?$ObjectIntersector1@$00@avx2@embree@@SA_NPEAU?$PointQueryK@$00@3@PEAUPointQueryContext@3@AEBUObject@3@@Z)

svenwoop commented 1 year ago

Could you explain what you are trying to do? Do you compile Embree? If so which config did you setup in cmake and which Embree version are you using?

camvinh commented 1 year ago

Could you explain what you are trying to do? Do you compile Embree? If so which config did you setup in cmake and which Embree version are you using?

I am grateful for your response. I build which this command

cmake -G "Visual Studio 17 2022" -D CMAKE_BUILD_TYPE=Debug -D EMBREE_LIBRARY_NAME=frontface4 -D EMBREE_BACKFACE_CULLING=ON -D EMBREE_BACKFACE_CULLING_CURVES=ON -D EMBREE_BACKFACE_CULLING_SPHERES=ON -D EMBREE_MAX_ISA=AVX2 -D EMBREE_ISA_AVX2=ON -D TBB_ROOT="C:\Program Files (x86)\Intel\oneAPI\tbb\2021.9.0\lib\cmake\tbb" -D CMAKE_INSTALL_PREFIX="F:/DevTools/embree4-frontface-Debug" ..

I can access BVH, but the intersect function can't complie embree::isa::BVH4Triangle4Intersector1Moeller().intersect(&(((Accel*)scene)->intersectors), rayhit, NULL);

svenwoop commented 1 year ago

You write that you can access the BVH, does that mean the above Embree compilation succeeds?

I just tried your combination of cmake flags under Linux and there it compiles fine. You do not need the EMBREE_ISA_AVX2=ON option, EMBREE_MAX_ISA=AVX2 already enabled AVX2.

Are you trying to additionally compile the embree::isa::BVH4Triangle4Intersector1Moeller().intersect(&(((Accel*)scene)->intersectors), rayhit, NULL); inside your application?

Please do use Embree through its API as described in an example here:

https://www.embree.org/api.html