Hi Ciao, my compiler is written in java and generates some .ll files as its output. Each of these .ll files is converted to an object file using llc. Then, I use clang++ to link them and generate an executable file without linking with any external libraries, so I cannot understand what you mean. Sorry, if my question sounds silly to you -- View this message in context: http://llvm.1065342.n5.nabble.com/problem-with-setLocale-tp54212p54235.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Hi Ali, On 28/01/13 06:38, ali_sedaghat wrote:> Hi Ciao, my compiler is written in java and generates some .ll files as its > output. Each of these .ll files is converted to an object file using llc. > Then, I use clang++ to link them and generate an executable file without > linking with any external libraries, so I cannot understand what you mean. > Sorry, if my question sounds silly to youdo you mean that you wrote your own version of setlocale? The usual setlocale lives in a system library, and to use it you must have linked with that system library. Usually a compiler like clang will automatically add that library to the list of libraries to link with, so you may not realize you linked with it. What is the exact command you used to create the executable? Ciao, Duncan.
I didn't implement my own version of setlocale, and as you said clang should automatically link with that library. I use the following simple command to generate executable: clang++ -o executable my-obj-files -- View this message in context: http://llvm.1065342.n5.nabble.com/problem-with-setLocale-tp54212p54251.html Sent from the LLVM - Dev mailing list archive at Nabble.com.