|
Post by ptitjoz on Jan 1, 2021 21:36:29 GMT 1
first of all, I wish you a happy new year 2021! I'm trying to use Hug and Canvas libraries simultaneously. how to solve these problems? Image attached. Thank you and best regards
|
|
|
Post by Pjot on Jan 2, 2021 8:33:15 GMT 1
Hi ptitjoz,
The warnings about the duplicate symbol can be ignored. They are not causing the compilation process to stop.
The problem is the variable 'i' which BaCon thinks is defined twice. Though this sounds strange, it makes perfectly sense: both the "canvas.bac" and the "hug.bac" context define a function called "CIRCLE".
Next to "CIRCLE", they also both define a function called "TEXT". Next to this, the word "CANVAS" from "hug.bac" means something different in the "canvas.bac" context.
So you see, the same function(s) are defined twice. To my knowledge, there is no programming language which can handle such situation.
In other words, you cannot use both "hug.bac" and "canvas.bac" at the same time. Unless you rename the functions CIRCLE, TEXT and CANVAS yourself.
If you need OpenGL together with GTK, you can try to install GtkGlExt or GtkGLArea. These libraries are accepted by HUG also.
HTH Peter
|
|
|
Post by ptitjoz on Jan 4, 2021 18:25:37 GMT 1
Thank you Peter for your explanations. I think I should be able to work around the problem Best regards
|
|