Hello,<br><br>I'm having what is probably a newbie problem, but a problem to me.<br><br>I have C source files in two different directories, that I use to build a dll, that is loaded by another C++ project.<br><br><br>I tried to build C objects and link with C++<br>
set_target_properties(ppc PROPERTIES LINK_FLAGS "-Wl,--kill-at" LINKER_LANGUAGE "CXX")<br>but I have linker problem (undefined references) when trying to link my C++ project.<br><br>So I decided to build my library as C++ and not C.<br>
I thought about setting language properties of my source files as CXX, so it would compile as C++, but did not work.<br><br>set(ppc_sources<br> "operators.c"<br> "iss_types.c"<br> "iss_vars.c"<br>
"iss_fetch.c"<br> "iss_instr.c"<br> "iss_decode.c"<br> "iss_mem.c"<br> "emul.c"<br> "iss_code.c"<br> "../extern/loader.c"<br> "../extern/system.c"<br>
"../extern/exception.c"<br> "../extern/random.c"<br> "../extern/sys_call.c"<br> "../extern/dump.c"<br> )<br>set_source_files_properties(TARGET ${ppc_sources} PROPERTY LANGUAGE "CXX")<br>
<br>I tried that, which did not work, so I tried to add the files in extern directory by first finding them with find_file. I found the files, added them to the ppc_source list, but now have problems changing properties of the files in current directory (either that or extern files are skipped at compilation).<br>
<br>What is the right way to do ?<br><br>Regards,<br><br>Maxime Lecourt<br>