Skip to content

Compile Guide

linwe2012 edited this page Nov 20, 2018 · 12 revisions

TOC - Alternatives

If are not on Windows platform or not using VS2017, build the project on your own. See here

Compile with VS2017

compiler

Please configure following things:

  • Solution Platform is set to x86. Note that x86-64 tends to make codes buggy.

confgure x86

  • In solution properties -> linker -> input, Add this one to Additional Dependencies.
opengl32.lib;glfw3.lib;

confgure libs

  • In solution properties -> configuration properties -> VC++ Directories

    • add $(SolutionDir)\ImageConvert\include; to Include directories

    • add $(SolutionDir)\ImageConvert\lib; to Library directories

configure VC++ Directories

Build Yourself

First you need your very own glfw3.lib, the lib included in /lib is compiled with Visual Studio 2017 and is x86. See GLFW download page. Follow the doc's instructons and compile it, and replace original glfw3.lib.

Add CMakeLists.txt to root directory. Your dir should look like this:

- [ROOT]

 - ImageConvert

 - ImageConvert.sln

 - CMakeLists.txt

 - ...

under [ROOT] run command

mkdir build
cd build
cmake ..

If Everything Fails

If it is still not working, find bmp.c, and add #define SUPRESS_OPENGL before including glim.h at approx. line 10. So image display & functions regarding OpenGL will not be compiled. But it is still able to write output ti a file.

Clone this wiki locally