fopen64 compile error under XCode with Cocos2D-X - xcode

I try to setup a new XCode Project for Cocos2D-x by myself, but I get an odd compile error in file cocos2dx/support/zip_support/ioapi.cpp, and XCode complains about the code using fopen64, ftello64 etc. My question is that is there any setting I need to set in order to make XCode compiled with these 64 bit functions? Thanks!

You can #define USE_FILE32API, preferably in your project settings. This is caused by the new version of minizip with 64-bit support.

Related

<unknown>:0: error: Swift does not support the SDK 'MacOSX10.12.sdk'

I'm on macOS 10.13.3 and I created a new fresh macOS project with Xcode(9.2). Without any custom code I changed the Base SDK from 10.13 (wich is default) to 10.12 in the Build Settings of the target. When I build it I get this error: <unknown>:0: error: Swift does not support the SDK 'MacOSX10.12.sdk'. I also changed the version (Base SDK) to 10.2 for macOS Deployment Target. I also changed the two locations for the Project Settings. But it does not compile. I always get this error. I can't imagine that swift is not backward compatible. Even to change the swift version from 4 to 3.2 has no effect. Is there really no way to compile this new fresh project for SDK 10.12 or even 10.10? Any help is highly appreciated.
What I did before:
To be able to change the version of the BaseSDK within Xcode,
I downloaded the SDK's from here: https://github.com/phracker/MacOSX-SDKs. I edited the info.plist file in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer There I deleted this two lines of code:
<key>MinimumSDKVersion</key>
<string>10.11</string>

wx/setup.h file not found on XCode 4

i'm trying to make work wxWidgets on OS X 10.8 with XCode 4. So far i've managed to build the library in static mode.
I'm currently trying to add the library to a basic "hello world" sample project.
For that, i follow a tutorial that explain step by step the process.
I'm stuck though on a simple error : can't find "wx/setup.h"
i've check the derivedData folder where is the .a library and there is no setup.h
I had one setup.h created when i compiled wxWidgets using the Terminal (but i had other errors this way after, so i had to switch to XCode wxWidgets generation.)
where is the generated setup.h when building wxWidgets from XCode ? and how do i tell the compiler to use it?
I've never compiled wxWidgets under OS X using Xcode so I can't help you with finding the file (however I do wonder if you tried find . -name setup.h or using Spotlight?), but I can guarantee that the library compiled from the command line is compatible with the applications built using Xcode, provided you use the same compiler and runtime library for both. So if you already have a version built from the Terminal, you really should be able to just use it.

How can I find out which c++ compiler is Xcode 5 using?

I am currently writing c++ code and compiling using Xcode. I was wondering: How can I find out which c++ compiler is Xcode 5 using?
I would like to know that to make sure that the program I am writing is compilable on other computers that don't necessarily use the same compiler.
Thanks in advance!
You can also check your target's build settings to see what the current setting is. However, Xcode 5 only uses the LLVM 5.0 compiler. GCC is no longer used.
https://developer.apple.com/technologies/tools/features.html

Xcode cannot run using the selected device after upgrade to Xcode 5.0

I upgraded to xcode 5.0 today. I then pressed play to run my project in the iOS simulator. This initially worked. Then I decided that I wanted to run the profiler. When I did that, I got the message:
Xcode cannot run using the selected device.
Choose a destination with a supported architecture in order to run on this device.
I looked at a couple past posts on this problem and decided to do a Clean and Build. Now I can no longer run in the profiler or the simulator. I consistently get the message:
Xcode cannot run using the selected device.
Choose a destination with a supported architecture in order to run on this device.
How can I resolve this?
Here are various settings:
My Deployment Target is 6.1
I have also tried changing the deployment target to 7.0, but that did not work either
It appears that the problem is not related to the architecture in the build settings as the error might suggest. Rather, I found that the problem seems to be related to the Build Options Compiler for C/C++/Objective C. I was using a gcc compiler (com.apple.compilers.llvmgcc42) and Xcode 5 has marked this as unsupported.
If I change the compiler to apple's default Apple LLVM 5.0, the project builds and it can now run in the simulator. The downside is that I have a lot of compiler warnings from code related to cocos2D v1.0 source code. But, at least I have a way forward.
Please follow below step
1>Go to Project Build setting
2>Change compiler for c/c++/objective c as Default compiler(Apple LLVM 5.0) (see in below image)
I had to change compiler for Default compiler (Apple LLVM 5.0) at two places:
Build Settings > Build Options > Compiler for C/C++/Objective-C (change to LLVM)
Build Rules > Files *.mc using GCC (change to LLVM)
Hard to find because code compiles even if Build Rules point to an undefined compiler.
After inspecting all the build settings for 15 minutes, this worked for me (Xcode 5.0.2):
Quit and restart Xcode
Check that the Executable File (also known as CFBundleExecutable) in the Info.plist file is set to ${EXECUTABLE_NAME} as opposed to any hardcoded value. This will ensure that even if you change your project name or target name or scheme name, that it still works.
This issue often occurs after duplicating targets on older projects.
Set the following in your Info.plist for the target:
Bundle Name = ${PRODUCT_NAME}
Bundle Display Name = ${PRODUCT_NAME}
Executable file = ${EXECUTABLE_NAME}
Build and run with these settings, after a successful build they can be changed to anything you want.
This works for me: "Quit and restart Xcode". I recently updated something and the testing device on Xcode said: 'iDevice' not iPhone or iPod. So I restarted then my iPhone came back to the target list.
I had this error when I changed the value of the "Bundle name"-key in the Target Properties. Changing it back to "%{PRODUCT_NAME}" solved the problem for me.

Xcode 4 and CUDA

Is there any way Xcode 4 can compile or just read correctly CUDA code ?
Thanks
You must look at the following links :
Combining CUDA, Qt, and Xcode
Cude-Gdb guide
Also, a bit related : Can't Build a simple Cuda Program using Xcode !!!
For Xcode 3.2, I used the plugin posted in a thread in Nvidia Forum. I have just upgraded to Xcode 4.0 and cannot build my CUDA project anymore because all .cu files are not compiled. I guess a new build rule in an active target needs to be added.
(I will edit and add more details if I can fix this.)

Resources