I am trying for hours now to find what on earth do I have to do in order to make Eclipse show proposals for the GTK+ 3.0 functions in C/C++. Does anyone have any idea how to do this? I mean on Netbeans I didn't do anything at all and it automatically gave me autocomplete suggestions with a little documentation.All I did is to insert the source file and the Makefile. In Eclipse haven't managed to add the Makefile that I made myself but I opened a new project with the source file only. Also I installed pkg-config but there was no luck with it for what I am asking for.
The information is extracted from this blog post:
You need to add the following paths to the "Includes" for the cross G++ compiler:
/usr/include/glib-2.0
/usr/include/gtk-2.0
Related
I've stumbled upon a problem trying to build a cross-platform app using cocos2d-x. Currently I'm trying to build for Mac OSX. I've tried linking to the boost header files but I keep getting errors stating boost/shared_ptr.hpp cannot be found. I'm only using the smart pointer headers.
I've added the root boost directory to Header Search Paths: $(SRCROOT)/../../boost_1_55_0 (non-recursive)
and the libs directory to Library Search Paths: $(SRCROOT)/../../boost_1_55_0/libs (non-recursive)
I tried this for both the root project file and cocos2d_libs project file with no good results.
I also tried adding to User Header Search Paths.
I've added them successfully on an SFML project, so does cocos2d-x bypass these search paths?
Thanks to anyone who is willing to help me!
Probably you have missed some step in your setup. Have a double check on every detail as you can go through these guidelines:
Porting a Cocos2d-x iOS game to Android
How to create a multi-platform project in one command line
This should help, as attention to detail if worthwhile.
I never figured out the problem, but I realise now that there's no need to even use boost. Cocos2d-x is compatible with C++11. What a relief.
Since XCode builds Cocos2DX projects for Mac and iOS you need to setup header search paths independently. Just switch target in XCode from iOS to Mac and set path to Boost for Mac build. Should work.
Using OSX and vim...
Downloaded SDL2 from the website, then moved the SDL2.framework into /Library/Frameworks/
Using tutorial code, and Makefile... SDL.h is not found.
Makefile: g++sdl-config --cflags --libssdltest.cpp -o sdltest
I've read numerous things about pointing the compiler to the framework, but everything I've tried doesn't seem to work, and I thought /Library/Frameworks/ was the default area for the compiler to look
Got it to work.
Getting this to work took multiple tries, but the root of the issue for each try was that most of the Tutorials I was looking at were for SDL1.2 when I was using SDL2.
This changed flags in the make file, directories to search in and other things. Interestingly, I could never get the compiler to see SDL.h when it was in the /Library/Frameworks/ directory. However using Macports to install SDL2 allowed me to point the compiler to where Macports installed SDL2 header files - /opt/local/include/SDL2
That seems to have done it for me
Thank you for your question, because I was having similar difficulties! There seems to be a dearth of detailed and helpful tutorials on how to install SDL2 using Macports.
I got it working! Here are the steps:
Visit this link to find the Macports package appropriate for your version of Mac OS X. Install the version you need, and once that is done, proceed to step 2.
https://www.macports.org/install.php
After installation is done, visit this link to find the SDL2 port.
https://www.macports.org/ports.php?by=name&substr=libsdl
The one I needed was the third from the top, called libsdl2. I will be providing the name for you so feel free to visit the link simply for your own edification.
Open the Terminal, and type sudo port install libsdl2. If all goes to plan, you should see it installing and updating. Once it is complete, you should have a functional installation of the SDL2 Header files, (ending in .h), Static Library files (ending in .a) and Dynamic Library files (which contain dylib). You may have to do some poking around in Finder to locate where it installed.
The advantage of this workaround is the ability to use SDL with other IDE's besides Xcode, Eclipse for instance. Whereas Xcode requires you to assign a path of /Library/Frameworks, this technique should allow you to use the IDE of your choosing.
The final step is going into your IDE and assigning the build paths to these newly installed and compiled SDL files. For instance, the paths for mine are /opt/local/include and /opt/local/lib. Be mindful of the fact that your path may differ from these, but these examples should give you an idea of where to look.
Hopefully this is helpful for somebody!
I develop app with some elements of Qt. I use cmake as build system and Eclipse only as editor and debugger. Everything comiles fine (thanks to CMake), however I can't force IDE to complete my Qt code.
Many times someone asked about it and the solution was to add include path. I did it of course, but
#include <QtSql>
is different, because there is no such file in include dir. It probably would work if I include all necassary files by hand. Is there any way to make Eclipse understand that "QtSql" means all classes from this module?
Install qt4 eclipse integration package. You can find instructions here
As the webpage says, the module package should live inside eclipse/plugins, untar the package and start eclipse just one time from the command-line:
eclipse -clean
From your question, I assume that you already have set up other Qt modules like QtCore or QtGui in Eclipse, if not please see this posting: https://stackoverflow.com/a/12670991/1611055
To also use the QSql submodule (without the eclipse Qt Plugin which is, IMHO, not maintained anymore) you need to add the following settings in "Project Properties => C/C++ General => Paths and Symbols":
On the "Includes" tab, for the GNU C++ language, add the following include paths:
/usr/include/qt4/QtSql
On the "Symbols" tab, for the GNU C++ language, add the following symbols with a value of "1":
QT_SQL_LIB
With these settings, the Eclipse C++ indexer also knows the QtSql classes.
I recently tried to figure out how to use freeglut with NetBeans 7.
I Google'd a lot and I didn't find a suitable tutorial on how to bind the stuff I need into it.
Currently I have more problem then this:
First one is:
- freeglut 2.8 => in order to compile it I need MinGW and msys.
I have both installed but I can't "configure" or "make all" and "make install" freeglut.
I didn't find an easy-to-read how-to for that task.
Next one:
- once built, where to put what files into a specific folder?
Last one:
- Once put the files into corresponding folder, how to use finally freeglut under NetBeans 7 on a C++ project?
I feel like a lack of information on that.
All I found are always answers like:
download, build, install and done. But I'm already stuck on the "install" and "build".
The solution:
Close NetBeans.
Install and download MinGW from mingw.org
After installing, add the Path to your SystemEnvironemt (example: C:\MinGW).
go to Start->Computer, right mousebutton, select properties
go to advanced system setting, in the following dialog press "Environment Variables".
in the tab "system variables", find the entry Path (or PATH)
add: C:\MinGW;
get freeglut pre-compiled package:
(http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/)
there is a good tutorial how to set up.
Now have fun (just #include " and you're done.
have fun.
Note #1:
if you have problems finding make, the folder is:
C:\MinGW\msys\1.0\bin\make.exe
(when installed MinGW on C:\MinGW).
"mingw-get install msys" in command line should get msys...
last but not least dont forget to add msys\bin to path, too. :)
here's a full tutorial, but in german language.
http://techchan.blog.de/2012/03/18/einrichten-opengl-netbeans-7-1-1-teil-0-start-13209096/
If you need it in english, let me know if you could translate it ;) otherwise i'll think about to translate it myself.
I had a difficult time getting glut working in Netbeans on Windows 7 until I found freeglut, I attributed this to the fact that glut is just very out of date and so are the tutorials I found.
Maybe this will help others looking for instructions on using freeglut in Netbeans. These instructions are like the ones in the link already provided, but help explain how to use it in Netbeans rather than from the command line. This tutorial expects that you've already gotten Netbeans and your compiler working together. IF you have not done so, I found the guide here very helpful: http://netbeans.org/community/releases/68/cpp-setup-instructions.html#mingw
download and extract freeglut from http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ into an easy to reach folder. (I recommend C:/FrGlut)
either add the bin folder (C:\FrGlut\bin) to your Windows PATH variable, or copy the freeglut.dll from your bin folder into C:\Windows\System32
Open Netbeans and open or create your project
go to: file->project properties
Select your compiler, go to include directories, and add the path to your freeglut include folder (C:\FrGlut\include)
under linker, select add libary, and navigate to the file C:\FrGlut\lib\libfreeglut.a
select options and add the following individually:
-dynamic -lfreeglut -lopengl32 -LC:\FrGlut\lib\libfreeglut.a
Netbeans should now be ready to use with your freeglut library.
To use the glut libary add the following include to your source:
#include <GL/glut.h>
Remember that freeglut.dll will need to be shared along with your executable in order for the program to run, as most users will not already have it.
I currently have a project, written in C++, it uses multiple libraries, including an sqlite and a wxWidgets library, it has a Graphical User Interface, made with Interface Builder.
This project was made with Code::Blocks.
What I now want to do, is import this whole project into XCode to make an .app file. I know about linking and search paths and all that (learned how to do that with a Command Line Project), but other then that, I don't really know where to start. I have searched a lot of forums but it's driving me crazy.
Can anybody help me out with a step-by-step of some sort?
Thanks!
Steps taken
wx-config --cppflags
wx-config --libs
Opening a new xcode project (cocoa)
Pasting the code written (all the classes, and the interface built)
Organizing the header search paths (including the output of libs)
Organizing the linking
Organizing the GCC other flags (including the output of cppflags here)
after that it worked.