I hope someone can shed some light on this. I read the help topic under "Advanced Topics" dealing with importing C code, copied their "doubler" example and implemented it without problems. Then, I made a functions file out of some of my C++ dlls, named the file "maestro.cpp" and implemented it exactly as the example went. However, I discovered that when I tried to run a test program I got this:
Building test
Compiling:maestro.cpp
Compiling:test.bmx
flat assembler version 1.51
3 passes, 2090 bytes.
Linking:test.exe
D:/test2/.bmx/test.bmx.gui.release.win32.o(code+0xb4): undefined reference to `SetProcessLock'
Process complete
After fighting with it for a while, I redid the doubler example bit for byte with one tiny change: I called the file "c_funcs.cpp" instead of "c_funcs.c" and I got the same error. Renamed it back to .c and it works fine (yes I remembered to change it in the import statement)
If I put c++ -specific statements in a file with a .c extension, Mingw will not compile them. Can anyone tell me how to make this work? I know I must just be missing some minor detail, but it isn't in the help topic.
Building test
Compiling:maestro.cpp
Compiling:test.bmx
flat assembler version 1.51
3 passes, 2090 bytes.
Linking:test.exe
D:/test2/.bmx/test.bmx.gui.release.win32.o(code+0xb4): undefined reference to `SetProcessLock'
Process complete
After fighting with it for a while, I redid the doubler example bit for byte with one tiny change: I called the file "c_funcs.cpp" instead of "c_funcs.c" and I got the same error. Renamed it back to .c and it works fine (yes I remembered to change it in the import statement)
If I put c++ -specific statements in a file with a .c extension, Mingw will not compile them. Can anyone tell me how to make this work? I know I must just be missing some minor detail, but it isn't in the help topic.