Page 1 of 1

Bug: Static library project broken on Mac OS X

Posted: Sun May 26, 2013 9:28 am
by fueler
I built a very simple static library and it fails to build. This works on windows. Recently I moved my development to Mac OS X and found this issue with the IDE.

temp.h

Code: Select all

#ifndef _TEMP_H
#define _TEMP_H

int add2num(int x, int y);

#endif
temp.cpp

Code: Select all

#include "temp.h"

int add2num(int x, int y)
{
    return x + y;
}
Build the project

Code: Select all

g++ -c temp.cpp -g -o ./Debug/temp.o -I. -I.
ar rcus ./Debug/libtemp.a @"temp.txt"
ar: @temp.txt: No such file or directory

Re: Bug: Static library project broken on Mac OS X

Posted: Sun May 26, 2013 9:33 am
by eranif
Remove the option: Settings -> Build settings -> Compilers -> gnu g++ -> advanced -> pass object list to the linker via file

Also: which version of codelite are you using?
Eran

Re: Bug: Static library project broken on Mac OS X

Posted: Sun May 26, 2013 10:18 am
by fueler
CodeLite 5.1
Mac OS X 10.8.3

Re: Bug: Static library project broken on Mac OS X

Posted: Sun May 26, 2013 10:21 am
by fueler
This solution works for building static libraries.

Re: Bug: Static library project broken on Mac OS X

Posted: Fri May 31, 2013 4:29 am
by fueler
An update, I have this being built on windows and the linker does understand the @"temp.txt" notation. I do not know why it does not work on the Mac OS X.