Add entries in addon_config.mk for ofxDlib in Visual Studio

#1

Hey there,

I wanted to use ofxDlib with Visual Studio. It compiled with some additional build commands.

Now I wanted to edit these commands in the addon_config.mk.

When adding multiple entries to a flag the project generator only uses the first entry:

ADDON_CFLAGS = -O3 -Wno-strict-aliasing

for instance only creates the cflag

-O3

in the Visual Studio project

I tried then adding a separate cflag

ADDON_CFLAGS = -O3 
ADDON_CFLAGS += -Wno-strict-aliasing

does not work as well.

Also defining flags for Visual Studio like

vs:
	ADDON_CFLAGS += DLIB_PNG_SUPPORT
	ADDON_CFLAGS += /bigobj

	ADDON_INCLUDES += libs\dlib\include\dlib\all
	ADDON_INCLUDES += libs\dlib\include\dlib\external\libpng

is also not working.

Someone has an idea how make an addon config work?

1 Like
#2

This should be possible, but I don’t have a windows machine to work with at the moment …

#3

Ok, solved it. The project generator had a bug and overwrote all previous flags when creating a project.

see https://github.com/openframeworks/projectGenerator/pull/214

1 Like
#4

Hey @brino So you were able to get ofxDlib working on VS? Are there any special instructions? If so I’d like to incorporate them into the documentation.

Thanks!

#5

Hey @bakercp, I wrote a little instruction

you may include it in your documentation. I am working a little on the project generator to get rid of the manual steps when creating the project.