I've just received a MacBook Pro for cross-platform game development. I've been making an SDL2 game project on CodeBlocks for Windows and Linux, and everything's fine on both operating systems so far. However, when it comes to Mac OS X, it seems I've got to use XCode instead.
I could figure out how to create a working SDL project in XCode. However, I would like to create an XCode project that shares the same source code as my CodeBlocks project, which happens to be on a Git repository. I've yet to find out how to do that. However, I've already put the #ifdef platform preprocessor instructions in my source code.
Could you give me some tips for doing that?
Use CMake to generate platform-specific makefiles/IDE projects.
Related
from my computer class last year, I have a bunch of c++ programs. I made these programs in Microsoft visual c++ 2010. That program I used it only available on Windows so I needed another program for I can still code. I now have a Mac and I want to still be able to code, so I downloaded Eclipse. My question is, how do I change the Eclipse setting to be the same as the windows? For example, when I copy my coding, it finds (using namespace std) and (#include ) as an error. Thank you!
Which version of eclipse did you install? Unless you installed the versions of eclipse with C/C++ plugins, it's just a Java IDE.
But uh Eclipse kind of sucks anyways so I'd recommend trying Clion.
I am using 64-bit Windows 7 PC and I want to develop C/C++ programs using Eclipse IDE.
I have tried DOSBox but it was not working for me. Also, I din't liked it as well.
I just want to use Eclipse for the same. I tried using CDT Plugin in Eclipse but that doesn't worked.
When I create a new C++ project, there are different Tool Chains available - Cross GCC, Microsoft Visual C++, MinGW GCC. I really don't know what exactly it is. I tried all but I am getting error and snapshot attached :-
Basically, it is not able to detect what iostream, stdio, cout is.
I tried different solutions available on other posts but none worked for me.
I don't know what to do with it. I know I am having problem due to 64-bit Windows but I want to fix this now. Please help!
You need to install MinGW, and then select the MinGW toolchain when selecting a new project.
Well I tried different tool chains on Eclipse IDE, but nothing worked.
Then I installed CodeBlocks IDE and plugins for the same as well.
Sic: Now, I am running C/C++ codes on Code Blocks perfectly.
You need to download MinGW and install the C++ compiler, don't forget to add the MinGW bin to the system variables under "path".
I recommend you using Visual Studio Code. If you do install Visual Studio Code, make sure to install Code Runner plugin to make running C++ projects easier.
My experience with C++, GCC, MinGW and Cygwin is very limited. However, I already tested it and realized that Cygwin is not the ideal solution for what I am trying to do. Even though a GTK+ program with GTKWebkit works fine on Cygwin, it's not that great in terms of packaging the final project to a single .exe. The dependency on the cywin1.dll, etc... is a deal breaker.
I tested MinGW and it works flawlessly for a standard GTK only application in Windows. And the file size is great!
I tested a standard GCC compiler to compile a GTK & WebKitGtk application on Mac and it worked flawlessly.
But in the windows world where I am getting confused with GTK and WebkitGTK. What I want to do is compile a sample WebkitGTK application on Windows using MinGW. So, all the required libraries are statically linked and has a single .exe.
What are my choices? How do I actually build WebsiteGTK on Windows? Please give me the tools and as much details as you can.
FYI, QtWebkit is not going to cut it. Their licensing terms are not that commercial friendly.
I never did get WebKitGtk to compile on Windows. I think I could have got it to work using cygwin, but that's a non-starter for the project I'm working on.
I ended up using Chromium Embedded Framework instead: https://code.google.com/p/chromiumembedded/. It has clear instructions and sample apps for Mac, Linux, Windows, and mobile.
Here someone says that the easiest way to do that it's to cross-compile from virtual machine. Actually, there is binary there.
He uses OpenSUSE booted through VirtualBox. Then, using osc tool, get the mingw32-webkitgtk from windows:mingw:win32 and build it with osc.
I have eclipse installed on windows and use cygwin to develop programs for linux. I compile using the cygwin toolchain and I also do my tests on cygwin.
Now I would like to compile my program also with the native linux toolchain and I also would like to debug it from the windows machine.
Is something possible with Indigo SR2? What is the best way to accomplish this?
I found this but then I would have two projects one for windows and one for linux. I would like to have just one project for both platforms to avoid syncrhonizing the sources back and forth.
Thanks.
I guess you want a cross platform development environment.
There are various tools for the job, but my choice would be CMake. Basically, you will write CMakelists.txt file instead of Eclipse .classpath and .project files, and generate those files with cmake executable. But in details, you will need to overcome some difficulties which are inherent in cross platform development.
I have successfully created more than one project with these tools, and they currently under a heavy load.
This seems like it should be strait forward, but a lot of the information I'm finding it pre-snow leopard, deals with cocoa and carbon, or the XCode IDE. None of which helps me with my problem at hand.
I simply want to compile, and run openGL using C++ without becoming dependent on the Mac environment since I will most likely need to get my code running on a linux box. Minor changes may be unavoidable though...
I've found the header files and can include them but I'm having trouble with the linking, compiling, and executing within Eclipse.
Thanks.
Please see my answer at OpenGL and GLUT in Eclipse on OS X