Bug: Static library project broken on Mac OS X

General questions regarding the usage of CodeLite
fueler
CodeLite Enthusiast
Posts: 17
Joined: Sun May 26, 2013 9:22 am
Genuine User: Yes
IDE Question: C++
Contact:

Bug: Static library project broken on Mac OS X

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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
Make sure you have read the HOW TO POST thread
fueler
CodeLite Enthusiast
Posts: 17
Joined: Sun May 26, 2013 9:22 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by fueler »

CodeLite 5.1
Mac OS X 10.8.3
fueler
CodeLite Enthusiast
Posts: 17
Joined: Sun May 26, 2013 9:22 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by fueler »

This solution works for building static libraries.
fueler
CodeLite Enthusiast
Posts: 17
Joined: Sun May 26, 2013 9:22 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post 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.
Post Reply