c++ - C++11 code/library in non C++11 program -


assume compile code in c++11 (i'll use lambdas) ".o" or library ".a". , have program, include previous library , header file, can't compile c++11, old 1 ( c++98 ). compile , work fine?

probably not. reason name mangling (why abi changes) in c++ exists because incompatibility differences between c++ versions can make code unstable if work @ all.

if have code doesn't compile against c++11, you'll have refactor 1 of programs compile against other compiler. (most old code compile new compiler)

if isn't option, can try , make c++11 lib dll c interface or com object interface, exceptions stop @ boundary, , if go dll route, more want write wrapper class access c++11 object, acts object on pre c++11 side of boundary.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -