You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My build script for PlatformIO is compiling my used .vult "modules" independently and if another function uses Util. for example, I get a compiler error from the C++ compiler about redefinition of the Utility functions.
I've tried with "-tables false" for all but the first vult file, but that doesn't fix the issue.
In file included from lib/vultgen/vultgen.h:5:0,
from src/main.cpp:2:
lib/vultgen/gen_blit_vult.h:254:21: note: 'float Util_cvTokHz(float)' previously defined here
static_inline float Util_cvTokHz(float cv){
^
How do I deal with it?
The text was updated successfully, but these errors were encountered:
DatanoiseTV
changed the title
Problem with multiple independently compiled files when included
Problem with multiple independently compiled files when included (redefinition error)
Sep 25, 2020
The way the compiler is architected is that rather than compiling/generating single files, a file and all it's dependencies are amalgamated into single file (or group of files, output.cpp and output.h). Rather than compiling each file separately, you have to compile the Vult files you use in your project at the same time. For example:
$ vultc synth1.vult synth2.vult -ccode
That will generate code for the synth1.vult and synth2.vult files including their dependencies. If both files use a third file called util.vult you will get the code for it as well with a single definition. Currently there's no way of generating the code for a single file. I didn't implemented it that way because I found it more convenient, when embedding the code in a project, to have a minimal set of files to compile.
My build script for PlatformIO is compiling my used .vult "modules" independently and if another function uses Util. for example, I get a compiler error from the C++ compiler about redefinition of the Utility functions.
I've tried with "-tables false" for all but the first vult file, but that doesn't fix the issue.
vultc -ccode -i vultinc/phase -i vultinc/util vultsrc/{INFILE} -o gen_{INFILE}
How do I deal with it?
The text was updated successfully, but these errors were encountered: