I am able to successfully build/compile LuaJit in static mode by doing msvcbuild.bat static. Though at the bottom of LuaJit Extensions it says if I use DLUAJIT_ENABLE_LUA52COMPAT option while building I will be able to use Lua5.2 components. Yet I don't see anywhere in the msvcbuild.bat file where I could add this on. If anyone has any information it would be greatly appreciated.
The line you want to change starts with LJCOMPILE=cl right near the top of msvcbuild.bat
just add /DLUAJIT_ENABLE_LUA52COMPAT to end of it.
The DLUAJIT_ENABLE_LUA52COMPAT option is in the src/Makefile.
If you want to build Luajit use DLUAJIT_ENABLE_LUA52COMPAT option, you should modify the Makefile and rebuild by make.
Related
I've been using the JetBrains IDE AppCode for a few years now, but I've never had the need to pass command line arguments to the debugger before. As you probably know, in order to link the compiler with the necessary curses files, you have to include -lcurses in the command line to compile the program. The issue I'm having is that I'm not exactly sure how to correctly pass this parameter to the debugger. Thanks in advance.
A debugger should not need the list of libraries since all of the relevant information about linked libraries exists in the executable which is being debugged.
I've never tried to do this before so this is actually my first time to cross compile a C program.
I have a main.c code file and need to create a makefile for it so i can cross compile this file. This c file has a dependancy curl library. When I compile it in xcode by adding a library, it builds fine. However,i still need to create a makefile for the cross compiling. Can I generate that makefile with xcode? If so, can you please provide some step to step guidance or do i need to use another tool to generate it?
Alternative approach
You can use CMake for this task. First of all take a look at this tutorial, that explains CMake basics. Then take a look at toolchain documentation.
Take a look at this post too.
Btw OpenWrt has also support for CMake based projects, just look at uci and libubox packages.
This post is a follow-up with the previous one link.
As being suggested to use one among 4 choices, I picked gnuplot-iostream. So what I did includes:
install MinGW
boost for gcc
build in MinGW
However, there is one missing library that I don't know where to find and add to the build. That is libutil
Googling shows that this lib is from libc6 package in Ubuntu.
Are those examples (link) in gnuplot-iostream supposed to build in Ubuntu? is there a replacement version of libutil in windows
THanks for the help!
libutil is needed for the openpty function, which is missing in MinGW (and probably in Windows overall). But openpty is only needed if you wish to intercept mouse clicks from gnuplot. If you remove -lutil from the Makefile then you should be able to compile all but one of the example programs (all but example-interactive).
If you have a need for processing mouse clicks in the gnuplot window then let me know as there may be a way to avoid openpty.
I want to write an own c/c++ IDE with syntax-check etc. And of course I need a compiler-functionality. For this I want to use gcc, I think it is a good option, isn't it? The IDE should not call a gcc-binary to compile, it should include the gcc source code, because after compiling the IDE I want a stay alone executable.
So my question: Is there sth like a tutorial or a good hint how to realize this?
btw it's for Mac, I'll write the IDE with XCode
Thank you!
Use LLVM's Clang and its libClang API, it's built for this purpose. GCC is not made to be used as a library.
You might develop a plugin for GCC, or a GCC MELT extension. But it could be that on MacOSX GCC plugins are not supported yet. You might also look into GCCSense which might fill some of your goals (but I never used it).
There is a bug in RHEL5's gcc-4.3.2 with which we are stuck. As a work-around we have extracted the missing object and put it in an object file. Adding this object file to every link makes the problem go away.
While adding it directly to LDFLAGS seems like a good solution, this doesn't work since e.g. libtool cannot cope with non-la files in there.
A slightly more portable solution seems to be to directly patch the gcc spec to add this to every link. I came up with
*startfile:
+ %{shared-libgcc:%{O*:%{!O0:/PATH/TO/ostream-inst.o}}}
where ostream-inst.o is added to the list of startfiles used in the link when compiling a shared library with optimizations.
Trying to compile boost with this spec gives some errors though since its build directly sets some objects with ld's --startgroup/--endgroup.
How should I update that spec to cover that case as well, or even better, all cases?
Go through this URL Specifying subprocesses and the switches to pass to them and GCC Command Options
If this help you, thats great.
I know this is not the answer you want to hear (since you specified otherwise in your question), but you are running into trouble here and are likely to run into more since your compiler is buggy. You should find a way of replacing it, since you'll find yourself writing even more work-around code the next time some obscure build system comes along. There's not only bjam out there.
Sorry I can't help you more. You might try simply writing a .lo file by hand (it's a two-liner, after all) and insert it into your LDFLAGS.
If it is a bug of GCC 4.3, did you try to build (by compiling from sources) and use a newer GCC. GCC 4.6.2 is coming right now. Did you consider using it?