Im trying to compile static library project with CodeLite and getting error:
ar rcus ./Debug/libtestlib.a @"testlib.txt"
ar: @testlib.txt: No such file or directory
But i have file testlib.txt. When i inspect exported makefile i see:
$(AR) $(ArchiveOutputSwitch)$(OutputFile) @$(ObjectsFileList) $(ArLibs)
For me it is strange to see there @ symbol near ObjectsFileList. How should i compile static library project in CodeLite ?
The @"testlib.txt"
is a way of letting the linker (or ar
in your case) to read the object list from a file and not from a command line, this is done because on some OS, there is a limitation on the input string that a program can accept from the command line.
Usually this is not a problem ( you did not mention what is your OS and CodeLite version ) but if it is a problem (like in your case), you can disable this from CodeLite's menu bar:
Settings -> Build Settings -> Compilers -> <Your Compiler Name> -> Advanced
and Uncheck the option: "Pass object list to the linker via file" and your problems will be gone
FYI: I only seen this error on OSX, is this the case here?
Eran