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:
Post
by fueler » Sun May 26, 2013 9:28 am
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
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Sun May 26, 2013 9:33 am
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
fueler
CodeLite Enthusiast
Posts: 17 Joined: Sun May 26, 2013 9:22 am
Genuine User: Yes
IDE Question: C++
Contact:
Post
by fueler » Sun May 26, 2013 10:18 am
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:
Post
by fueler » Sun May 26, 2013 10:21 am
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:
Post
by fueler » Fri May 31, 2013 4:29 am
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.