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

BUILD_SHARED_LIBS=OFF with OCCT plugin on Windows fails to build because of name conflict #1322

Open
mwestphal opened this issue Mar 22, 2024 · 0 comments
Labels
os:windows type:bug Something isn't working
Milestone

Comments

@mwestphal
Copy link
Contributor

Describe the bug
BUILD_SHARED_LIBS=OFF with OCCT plugin on Windows fails to build because of name conflict

Indeed, with OCCT plugin and static build, there are exported symbols for some reason, which causes MSVC to created a f3d.lib file for the f3d.exe. This is an automatic mechanism that cannot be disabled in MSVC.

This file conflicts with the actual f3d.lib from the libf3d, causing a build issue.

To Reproduce
Steps to reproduce the behavior:

  1. Build F3D on Windows with -DBUILD_SHARED_LIBS=OFF -DF3D_PLUGIN_BUILD_OCCT=ON
  2. Build fails with:
   VTKExtensionsPluginOCCT.vcxproj -> D:\a\f3d\f3d\build\bin_Release\VTKExtensionsPluginOCCT.exe
  Generating F3DIcon.h, F3DIcon.cxx
  Building Custom Rule D:/a/f3d/f3d/source/application/CMakeLists.txt
  F3DConfigFileTools.cxx
  F3DIcon.cxx
  F3DOptionsParser.cxx
  F3DStarter.cxx
  F3DSystemTools.cxx
  main.cxx
  Generating Code...
LINK : fatal error LNK1149: output filename matches input filename 'D:\a\f3d\f3d\build\lib_Release\f3d.lib' [D:\a\f3d\f3d\build\application\f3d.vcxproj]

Expected behavior
Build complete

System Information:

  • OS: Windows
  • GPU and GPU driver: /

F3D Information
Paste the content of f3d --version: master

Additional context
Please note ENABLE_EXPORTS has no effect here, confirmed by Brad King

@mwestphal mwestphal added type:bug Something isn't working os:windows labels Mar 22, 2024
@mwestphal mwestphal added this to the 2.4.0 milestone Mar 22, 2024
@mwestphal mwestphal modified the milestones: 2.4.0, 2.5.0 Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:windows type:bug Something isn't working
Projects
Status: Investigate
Development

No branches or pull requests

1 participant