Windows 64bit cpp external std library issue
hi,
so I use a trick to compile .cpp externals, not .c externals. This is casting to a t_class*. This works fine on windows 32 bit and MacOS X.
I'm trying to do a very simple external on 64 bit, using Visual Studio, which I'm very unfamiliar with, and using the v120 platform toolset. If I so much as #include or any stdlibrary stuff, I get a mutlitude of errors
error C2054: expected '(' to follow 'using' in file cstdlib
etc etc
is tehre some way the project would need to be setup that I might be missing here?
the windows32bit was done using v100 and no issues there.
any help appreciated.
Andrew
to narrow this down. If I do
#include //the C version
this is fine. But
#include // the C++ version
I have the syntax errors. So something to do with how the C++ std lib can be included ?
HI !
im not an expert . but as far as ive noticed
max uses _cdecl calling convention . that might be not compatibile to the vector calling style under the hood . but im not 100 % sure
U can try link msvcprt.lib to your dependencies directly by configuring : Configuration Properties / Linker / Input / Additional Dependiences (field) .
Or change setting in : Configuration Properties / C/C++ / Code Generation / Runtime Library to Multi-threaded (/MT) . This will make the library static for the external .
Hope that helps .
error C2054: expected ‘(‘ to follow ‘using’ in file cstdlib
etc etc
Hi i have the same kind of errors trying to compile faustgen~ for Win64.
The header called by faustgen~.cpp is actually math.h with #include , but i guess that because .cpp is the extension of faustgen~ the C++ compiler is invoked and automatically the header calling became #include wich i guess is a mor "modern" version.
here are some hints!
basically we have to specify if the solution has to be compiled as C or as C++
definitelly
That is it!
so, you need to click on the object name, rhs of page, and the spanner/wrench icon to open propery pages. Then
ConfigurationProperties, C/C++ -> Advanced
change to "Compile as C++ Code (/TP)"
from "Compile as C Code"
and choose the v120 tools in General.
This then happily handles the include and the like.
Thanks!