I have a library 'bar' that is C++, but exports a C API. So, say, I have
this CMakeLists.txt:
add_library(bar bar.cpp)
add_executable(foo foo.c)
target_link_libraries(foo bar)
On most platforms this is fine, but on Solaris it can't link due to
unresolved externals.
I can work around this by
Not familiar with your compiler, but a c++ main should be used to ensure
all c++ static global objects are initialized properly. gcc does a good job
at hiding this.
Juan
On Jun 28, 2010 6:46 PM, Matthew Woehlke mw_tr...@users.sourceforge.net
wrote:
I have a library 'bar' that is C++, but