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

Having issue compiling plugin with glext.h on MSVC (Windows 10) #70

Closed
yueda1984 opened this issue Feb 21, 2020 · 4 comments
Closed

Having issue compiling plugin with glext.h on MSVC (Windows 10) #70

yueda1984 opened this issue Feb 21, 2020 · 4 comments

Comments

@yueda1984
Copy link

yueda1984 commented Feb 21, 2020

Hi, I am having issue compiling openfx-misc on MSVC. I noticed that devernay provided the precompiled misc.ofx.bundle but I want to compile some plugins individually so when I bring them to Toon Boom Harmony, the module library won't get so crowded with extra plugins.

First about, Noise.cpp and PluginRegistrationCombined.cpp that are present on Misc.vcxproj are no longer present on the repository. So I removed them from the project.

ColorLookup.cpp includes GL/glext.h which was not installed on my computer, so I downloaded the header and manually added to openfx-misc:
https://www.khronos.org/registry/khronos_headers.zip

Then, changed the line46 of to ColorLookup.cpp:
#include "../khronos_headers/GL/glext.h"

The compiler can find glext.h now, but it leads to this:
unknown

Some threads suggest that I need OpenGL 1.2 or higher but installing OpenGL 4.7 driver didn't help.
I also downloaded pre-compiled Mesa3D library (https://downloads.fdossena.com/Projects/Mesa3D/Builds/index.php)
then added as linker's additional dependency but I get the same LNK2001 error. Any help?

@devernay
Copy link
Member

Vcxproj files are outdated and should be removed.
Use cmake to build instead. See .appveyor.yml file for details on how we build the VS-compiled binaries.

@yueda1984
Copy link
Author

yueda1984 commented Feb 22, 2020

Use cmake to build instead. See .appveyor.yml file for details on how we build the VS-compiled binaries.

Thank you for the instruction. I followed the yml file to build the vcxproj for VS2019 first with CMake 3.17.0-rc1, which returned an error:
cd C:\Users\Admin\Documents\openfx-misc\build
set arch= Win64
set GENERATOR="Visual Studio 16 2019%arch%"
cmake .. -G %GENERATOR% -DCMAKE_INSTALL_PREFIX="c:/Users/Admin/Documents/openfx-misc/install"
CMake Error: Could not create named generator Visual Studio 16 2019 Win64

But building for VS2013 worked. I opened generated build/OpenFXMisc.sln then built INSTALL.
Misc.ofx.bundle was built successfully but CImg.ofx.bundle was failed because of missing "openfx-misc/CImg/CImg.h".

@devernay
Copy link
Member

the appveyor script downloads CImg.h and inpaint.h

@yueda1984
Copy link
Author

yueda1984 commented Feb 22, 2020

Thank you devernay! After adding the 2 headers to the correct folder, I was able to build CImg.ofx.bundle successfully. I still want to build some plugins separately but apparently there is #28 so I will continue there.

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

2 participants