Hi all,<br><br>My Cmakelists contains:<br><br>set(myobj  ${CMAKE_CURRENT_SOURCE_DIR}/../objfolder/myfile.obj)<br>add_executable(myexe  main.c ${myobj})<br><br>This myfile.obj object file is generated while building objfolder before creating this executable<br>
<br>Now on building this executable i got a warning:<br><br>main.obj: warning: earlier declaration of a function f1() found in myfile.obj: second definition ignored..<br><br>This means it is taking the f1() function from myfile.obj but i want f1() function to be taken from main.obj..<br>
<br>What to do?<br><br>Also it is imp. to link this myfile.obj file to myexe  executable since it depends on other functions of this object file..<br>So this object file has to be there.<br>Just tell me how function f1() can be taken from main.c rahter than from myfile.obj evenif it still gives warning as:<br>
<br>myfile.obj:warning: earlier definition of function f1() found in main.c (since if it takes f1() from main.c): second def. ignored<br><br>Regards-<br>Ankit Jain<br><br><br>