How to create a .tar.gz source archive in netbeans c++ - makefile

I wish to be able to redistribute the source for my netbeans project, preferably in a .tar.gz source archive. Currently if I just copy the source files, the makefile, and the relevant mk files from nbproject, it doesn't work. When I try and compile on another machine, make will complain that it can't find the source code, as the makefile tries to compile /home/user/netbeansprojecs/project/sourcefile, instead of the source files in the same folder as it.

Related

Why Do the Lua Binaries Contain .h and .c Files, but Lua IUP Binaries Contain .DLLs?

I'm trying to update an old app that uses Lua and IUP, but I'm not very experienced, so I'm wondering if I have too many files. I originally downloaded Lua 5.4.3 and followed a tutorial on how to turn those .c and .h files into Lua.dll, Lua.exe, Lua.lib, and Luac.exe.
Then I downloaded iup-3.30-Lua54_Win64_bin.zip and extracted to it's own folder. That folder contains a bunch of .DLLs and a few .EXEs. Since those files have their own interpreter (iuplua54.exe), are the files in Lua 5.4.3 unnecessary? Why do these downloads have different file types? Did I install them wrong or did I get the wrong files?
I'm having issues with different Lua .exe files giving me different errors when I try to open a particular .lua script.

Using SDL-C library with Code::Blocks on Windows...wizard can't locate SDLmain library file

I am new to programming and I am trying to use SDL library with Code::Blocks on Windows. I downloaded the Library from : https://www.libsdl.org/download-2.0.php.
I downloaded the files, decompressed and then copied SDL.dll file in
C:\Program Files (x86)\CodeBlocks\MinGW\bin
and then the include and lib files in
C:\Program Files (x86)\CodeBlocks\SDL,
which is a new file I created. However, when I open Code::Blocks, new SDL project and arrive at the step where I am supposed to give the directory where the include and lib files are, once I hit next I get the following error :
The path you entered seems valid but the wizard can't locate the following SDL's library file: SDLmain in it.
Any idea why this might be happening and how I can fix it?

How to build libpng using gcc?

I am currently working on a program that will have to be able to read and save PNG files. I've decided to use libpng so I've downloaded it's source files. I unpacked them and here is where my problem started.
There are very many files in the unpacked folder and I don't know which of them I should compile to get proper.o files that I will be able to link to my program.
There are makefiles in the libpng "scripts" directory. Most of those contain a list of the files that need to be compiled (namely, all of png*.c in the main libpng directory except for pngtest.c).
You'll also need pnglibconf.h which you can create by copying scripts/pnglibconf.h_prebuilt.

Does Boost BCP also copy the required LIB files?

This may be a no-brainer for longtime boost users, but I’m just getting into boost.
I built the full boost distribution and BCP to extract just the parts I need to put in my VisualStudio C++ project.
What I found is when I call bcp, it copies the source tree to the destination. It doesn’t copy the required compiled lib files though (for those modules that need it).
So when I build my project and include
#include "boost/program_options.hpp"
for example, I get a linker error:
*Error 1 error LNK1104: cannot open file 'libboost_program_options-vc100-mt-sgd-1_54.lib'*
So my question is this:
should BCP also copy over the compiled LIB files as necessary ?
or
is it standard procedure for users of BOOST to manually copy those complied library files themselves?
I recently started experimenting with BCP. It seems like any boost modules that require libraries will not be copied, but instead they need to be built using bjam.
For example, when you run bcp on your code it will output some 'INFO' statements like this:
INFO: tracking source dependencies of library date_time due to presence of BOOST_DATE_TIME_DECL...
INFO: tracking source dependencies of library smart_ptr due to presence of "void sp_scalar_constructor_hook...
Notice that in addition to the generated 'boost' folder containing a bunch of copied boost header files there will be a 'libs' folder along with Jam files (Jamroot, Jamfile.v2, etc).
I think you need to cd to the directories with the Jamfiles and use bjam to build the needed libraries.
Maybe this answer will help:
Building a subset of boost in windows

Setting up SDL in MinGW

Currently, I'm trying to figure out how to set up SDL with MinGW. I've seen a couple of sites that have methods (or rather, the same method re-published), but I'd rather not have a "quick 'n dirty" setup.
I see there's an sdl-conf file, I have MSYS installed, and I've downloaded the latest SDL 1.2 MinGW developer release.
The tutorial is here. It explains everything needed:
First thing you need to do is download SDL headers and binaries.
You will find them on the SDL website, specifically on this page.
Scroll Down to the Development Libraries section and download the Mingw32 development library
Open gz archive and there should be a *.tar archive inside.
Open the *.tar and there should be a folder inside of that.
Open the folder and it'll contain a bunch of subfolders.
Copy the contents of the lib subfolder to the MinGW lib folder.
The MinGW lib folder should be at C:\MinGWStudio\MinGW\lib.
After that, open the include subfolder in the archive and extract the folder named "SDL" to the MinGW include folder, which should be at C:\MinGWStudio\MinGW\include.
Note: Some versions of SDL won't have a folder named "SDL" in the archive's include subfolder, but just a bunch of header files. To get around this simply create a folder named "SDL" in your MinGW include folder and copy all the header files from the archive to that folder you made.
Now take the SDL.dll from the archive (it should be inside the bin subfolder) and extract it. You're going to put this in the same directory as your exe when you compile it.
Alternatively, you can copy SDL.dll to C:\WINDOWS\SYSTEM32 so your SDL app will find SDL.dll even if it's not in the same directory. If you're using a 64bit version of Windows, you'll want to put the dll in C:\Windows\SysWOW64.
The problem with this method is if you have multiple SDL apps that use different versions of SDL, you'll have version conflicts. If you have SDL 1.2.8 in SYSTEM32 when the app uses 1.2.13 you're going to run into problems. Generally you want to have your SDL.dll in the same directory as your executable developing and you'll always want to have SDL.dll in the same directory as the exe when distributing your app.
Now start up MinGW Developer Studio and start a new empty project.
Go to the project settings.
Under the Link tab, paste:
mingw32, SDLmain, SDL
in the libraries field.
Add source new source file to the project and paste the following code into the new source file:
//
#include "SDL/SDL.h"
int main( int argc, char* args[] ) {
SDL_Init( SDL_INIT_EVERYTHING ); //Start SDL
SDL_Quit(); //Quit SDL
return 0;
}
Now Compile. Save the new source file if necessary and make sure SDL.dll is in the same directory as the executable. If there are no errors, you're finished. Otherwise go back and make sure you didn't skip a step.

Resources