You mean like this one?
Yes, I have been all over the internet. Like I said, I eventually solved my problem using MinGW. I don't know why it worked and VS had a problem. Probably my own lack of experience had something to do with it.
-
Problem compiling external on Windows
-
@joelakes said:
Hi David,
Did you resolve the problems with the $s_float in the counter example? I am getting the same problem using Dev-C++.
Thanks,
JoeI was having the same problem. Also in the [pan~] signal class example with &s_signal.
But I finally solved it, or at least found a way around it that seems to work.
In How to Write PD Externals there's a line explaining that s_signal refers to the
string "signal" in a lookup table somewhere, so I tried to just replace &s_signal with "signal" each place it was used. Of course, this didn't work.Later I noticed that anywhere else a string appeared, it was added with gensym("string"). So this time I replaced &s_signal with gensym("signal") and it actually worked.
My ideas on what's going on are either:
A. The external is compiled before "signal" is added to the table.
B. "signal" is never added to the table, unless you do it
C. The external can't see the table, for what ever reason.These are just guesses. I'm learning as I go, and not very familiar with C yet.
I would like to know however if this is a good practice or a hack.
Also, should I use gensym() every time s_signal appears, or does it just need to be called once? ie Will it cause any problems to call gensym() multiple times with the same argument?Hopefully this will help someone else out there having the same problem.
-
I got as far as {external}.o
It seems that I need to include a flag -std=c99 for some trig definitions. Any ideas on how to do this using MinGW32?