Problems in Mac OS X 10.5.8

CodeLite installation/troubleshooting forum
cheburan
CodeLite Curious
Posts: 2
Joined: Tue Dec 20, 2011 1:05 am
Genuine User: Yes
IDE Question: xuy
Contact:

Problems in Mac OS X 10.5.8

Post by cheburan »

Dear colleagues,

Could you help me with my problem in CodeLite under Mac OS X? I tried made new template project "Hello world" and can't compile it. Firstly I created empty workspace and secondary created console project:

Code: Select all

#include <stdio.h>

int main(int argc, char **argv)
{
	printf("hello world\n");
	return 0;
}
Build command illustrate follow results:

Code: Select all

gcc -c  "/Users/Anton/Data/Projects/temp_prj/testworspace/Test1/main.c" -g  -o ./Debug/main.o -I. -I. 
gcc -o ./Debug/Test1 @"/Users/Anton/Data/Projects/temp_prj/testworspace/Test1/Test1.txt" -L.   
i686-apple-darwin9-gcc-4.0.1: @/Users/Anton/Data/Projects/temp_prj/testworspace/Test1/Test1.txt: No such file or directory
i686-apple-darwin9-gcc-4.0.1: no input files
make: *** [Debug/Test1] Error 1
File Test1.txt contains just one row: "./Debug/main.o"
I tried check in command:

Code: Select all

gcc -o ./Debug/Test1 ./Debug/main.o -L. 
inplace of

Code: Select all

gcc -o ./Debug/Test1 @"/Users/Anton/Data/Projects/temp_prj/testworspace/Test1/Test1.txt" -L.
and it is work well....

Could you tell me why I can't build project by using build command of codelite and what is difference between two rows:

Code: Select all

gcc -o ./Debug/Test1 ./Debug/main.o -L. 

and 

gcc -o ./Debug/Test1 @"/Users/Anton/Data/Projects/temp_prj/testworspace/Test1/Test1.txt" -L.
Conceptually it is should be same as I understood, becuase Test1.txt file contains list of object files for building. Thanks a lot for your answers!
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: Problems in Mac OS X 10.5.8

Post by frank_frl »

Goto Build Settings/Compilers/g++/Advanced and uncheck 'Pass object list to linker via file'

Frank
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problems in Mac OS X 10.5.8

Post by eranif »

cheburan wrote:Could you tell me why I can't build project by using build command of codelite and what is difference between two rows:
It should work, I think it is a bug in Mac's GCC

But do as Frank wrote and it will work for you.
The reason I added the option to pass the objects in a file instead in a command line directly is that on some OSs there is a limitation on the command line arguments that can be passed - so this workaround is needed (for example: when compiling codelite on Windows)

Eran
Make sure you have read the HOW TO POST thread
cheburan
CodeLite Curious
Posts: 2
Joined: Tue Dec 20, 2011 1:05 am
Genuine User: Yes
IDE Question: xuy
Contact:

Re: Problems in Mac OS X 10.5.8

Post by cheburan »

Thanks a lot for all answers. I tried to like Frank describes. Seems that it work. Probably GCC under MacOS doesn't understand object list inside txt file.

I think this topic can be closed.

Best regards!
Post Reply