Re: [CMake] error: multiple declaration of main

2009-01-28 Thread Maik Beckmann
2009/1/29 ankit jain : > 2009/1/29 Maik Beckmann >> >> > but there is another function of a one header file which is called in >> > the >> > two C files. also it used to initialize a variable... >> >> If this is the case, you shouldn't have any problems, so I assume the >> situation is different.

Re: [CMake] error: multiple declaration of main

2009-01-28 Thread Maik Beckmann
2009/1/29 ankit jain : > thanks for the help. with ur advice iam able to remove the multiple > declaration error of main by creating namespace. Nice! > but there is another function of a one header file which is called in the > two C files. also it used to initialize a variable... If this is the

Re: [CMake] error: multiple declaration of main

2009-01-28 Thread Maik Beckmann
Am Mittwoch 28 Januar 2009 schrieb ankit jain: > Then how to include those files containg main() function. anyhow we have > create a libraries for it. what is the way to create libraries from those. Alter the source files to make them usable as part of a library and as a program on its own. #ifd

Re: [CMake] error: multiple declaration of main

2009-01-28 Thread Maik Beckmann
Am Mittwoch 28 Januar 2009 schrieb ankit jain: > thanks maik fo rhte reply. > > but actually i have done something like this: > > add_library(myapp SHARED ${mypp_srcs}) > > where myapp_srcs contain around 4 .C files. > > in this case how to do that > > Regards- > ankit jain > Hm, you are a C++ new

Re: [CMake] error: multiple declaration of main

2009-01-28 Thread Maik Beckmann
Am Mittwoch 28 Januar 2009 schrieb ankit jain: > hi all, > > in one of my folder i have three files. in each of them a main() function > is defined. now on building it says that multiple declaration of main. if i > compile the makefile using gcc only no such error had came. > Guide me what to do? >

[CMake] error: multiple declaration of main

2009-01-28 Thread ankit jain
hi all, in one of my folder i have three files. in each of them a main() function is defined. now on building it says that multiple declaration of main. if i compile the makefile using gcc only no such error had came. Guide me what to do? Regards- ankit jain __