installing GTK+3 on CodeBlocks Windows 7 - c

I am trying to install GTK+3 on windows. It installs but it always tells me that it can't find the file libgtk-3-0.dll. However, GTK+2 works perfectly for me. The main issue is that I am trying to run some interface coded with GTK+3. Only the interface appears but none of the drawing in it! How can I make this work?
Do I need GTK+3 to make it work? If yes, how can I install it properly?

If you installed both gtk2 and gtk3 there might be a conflict with you path.
Surely if you installed gtk2 from a setup file (it usually add a path)
I do use both and compile gtk project with codeblock as well.
What I do is a dedicated folder where there is all gtk and dependency dll and always put the gtk executable I've build with CB.
download gtk3 from there http://www.gtk.org/download/win32.php and unzip
then create a folder MyGtk for example put all .dll from the /bin directory
copy also the /etc & share content at the root of MyGtk
then copy your .exe app also
everything should run fine.
If not edit your windows path and remove any location to c:\xxx\gtk

Related

How do I make my Setup project produce an executable?

I've built a small desktop application with which I am trying to use a Setup project to allow other users to install it. But whenever I run this installer, it does not produce an executable file. This is my first time making a setup project.
My solution contains two projects. One is the setup project which installs the primary output from the other project. The other project is a WPF App that consists of two xaml files, a xaml.cs file for each, an App.config file, and an icon. It also has a few dependencies including one Assembly, two Frameworks, and a handful of Packages. The app works exactly as intended whenever I start a Visual Studio debugging instance on either Debug or Release configurations.
I followed these instructions to build my Setup and deploy my app.
Whenever I ran the resulting Setup, it installed an XML configuration file, a JSON file, a main application dll file, and a bunch of dll files for my assemblies. I looked into some resources on how to run the main dll file properly, only (A) I'm completely stumped by everything I find on that topic, and (B) I would rather just produce an executable file anyway, since I intend for this Setup project to be used by other people and it would be inconvenient to ask said others to jump through the same hoops just to run it.
Why does my Setup project not produce a .exe file? I see that a .exe file is produced in my bin folder whenever I build my project (and this .exe works), so I would think the setup project should also produce one of those, but it doesn't. What am I doing wrong with my Setup project or anything else?
The setup.exe is a bootstrapper over the setup.msi. We can install the content using .msi or by running .exe which inturn runs /gets the data from the msi. To enable setup.exe building, go to solution explorer -> project -> properties -> prerequisites. check the check box on the top "Create setup program to install prerequisite components". apply and rebuld the project. A setup.exe bootstrapper will be created allong with msi.
Switch to Release mode, then rebuild your setup project. If everything went well (check the output console), you'll find an MSI file inside {setup project folder}/bin/Release
In "system file" from your proyect installer, you shoud to add in "Application Folder" the next source = PublishItemsOutpuGroup. In my case functions well.

ioquake3 on MacOS: Bundling Freetype With Game

I'm making a game based on ioquake3, and I enabled the use of Freetype for rendering fonts in the game.
However, that library has been a sore on my back throughout the development, and now the game doesn't run right on MacOS computers besides my own because they don't have Freetype installed.
It will look for "renderer_opengl2_x86_64.dylib" in "." and fail. Yet ioquake3 runs just fine on the same computer. And if I transfer ioquake3.app's renderer dylibs, the game runs but without the text rendering because Freetype isn't enabled by default.
So my question is how I would be able to bundle Freetype with my ioquake3-based game. I thought it would be as simple as copying libfreetype.6.dylib into [game].app/Contents/MacOS , but that didn't work either. The original game doesn't use it so copying the renderer dylibs didn't work. I don't want every user to have to install Freetype and link it and all that, so how do I get the library bundled with my app?
OK, so I found out that the renderer dylib files were calling on a hard-coded directory in the system, a directory I had to map myself to get the game to compile but otherwise is not on a normal MacOS computer.
So what I did was use install_name_tool in Terminal to change the directory the dylibs searched in.
install_name_tool -change /usr/local/lib/libfreetype.6.dylib #executable_path/libfreetype.6.dylib /Applications/{game name}.app/Contents/MacOS/renderer_opengl2_x86_64.dylib
^ Then the same thing for the OpenGL 2 dylib, and I copied the libfreetype.6.dylib file into the Contents/MacOS directory of my app. After that, the game ran perfectly on my computer and the "guinea pig" computer I used that didn't have Freetype installed.
I hope this might help anyone else having issues with Freetype and ioquake3!

How to run scripts from within eclipse

I have a project that doesn't use autotools, but has a Makefile which I run to build the code. This make file is run from within in a shell script. I have imported the project in eclipse, but I can't seem to run the shell script (Something like Ctrl + B to Make or add one of the Make targets viz., make all or make install).
Is there a way I can do this?
You can specify a script to build your project in Project Properties -> C/C++ Build -> Build Command -> Builder Settings.
You can uncheck Use default build command and specify yours (e.g. make all, make install or bash make_all.sh). Or you can leave the default build command (it must be make) and in tab Behaviour specify targets.
But before you should have imported your project Makefile Project with Existing Code.
Don't use Eclipse if you are using Make tools in the same project. Eclipse brings you some tools for project compiling, etc. that you already have with Make/Automake.

Add external source files from a library to the project in Eclipse-CDT

I have a project which I try to compile with Eclipse-CDT. The project depends on a library with header files and source files. How can I configure the project in Eclipse such that it will compile the needed source files from the library with the project?
With a makefile I use:
SRC+=lib_source.c
You can add linked source file.
Choose project properties and in the left panel choose c++ general.
Under it choose path and symbols.
Now in the right panel tabs choose source location and add linked source folder.
Include you need to define in "include" (under c++ build you will find settings)
Another approach is to use the operating system to add your libraries to the project. Eclipse then treats all source files (including library files) as part of the project, and therefore compiles any that need it even if they are in the libraries. This set-up allows keeping the library sources in a separate git repository from the project source code. You can record the git commit of a library to provide library version control so that improving the library in one project does not break all the others. The setup relies on the operating system's capability to link directories in a way that is entirely transparent to eclipse--in windows using the mklink command.
In windows the steps are
put your library files in a clean workspace not mixed with .git (you can have .git in the parent directory as egit sets it up)
use cmd window in administrator mode to add a link from your project directory to your library directory.
from eclipse press F5 t make sure your project matches what is on disk, then set up git to ignore your library directory.
set up your library file properties for read only access unless you are still tweaking that library.
set up your project include path to include the project sub-directory in your project.
I can't remember why I abandoned eclipse linked directories; i think it was that the includes kept breaking. The mklink approach has worked flawlessly so far.
I have a pdf tutorial of how to set this up--but I'm new to the forum and don't see how to attach a file.

VB6 Will not Create EXE file - But it use to?

I am trying to compile a VB6 project. On the File Menu it use to display MAKE PROJ1.EXE. Now it displays MAKE PROJ1. (note EXE is missing) The program runs fine in the IDE. I can start with full compile. I can even create a set up disk from the packaging and deployment wizard. I have a sucessful install, but the package will not run. There is no exe file. Other vb project compile just fine. Can anyone lend a hand????
That's weird
Open up the .VBP project file using Notepad and verify the following entry is correct
ExeName32="PROJ1.EXE"
Try this:
Right-click on VB6 toolbar
Customize
Make some change
Reset
Close
Make ... .exe
After that, it should work.

Resources