We are working on IOS and Android with cocos2dx, we have lots of lua script in our codes, and it working well in the IOS and Android. now we plan porting the app to Windows Phone 8 or Windows RT.
But we get stuck by compiling lua in windows phone 8 system. It looks as if lua depends on some win32 API which are not supported in windows phone system.
The compilation errors are:
undeclared identifier 'LoadLibraryA'
undeclared identifier 'GetModuleNameA'
So, anyone has some ideas?
If you change the first non-comment line in the Makefile to PLAT=generic, lua will compile without shared library support (that means you will not be able to load .dll with the require command) and lua will compile without any link errors. If you need to use C-libraries then add them statically to the lua binary by adding them to the preloadedlibs array in linit.c
Related
I am using third-party libraries(.a) that do not support simulator. When I build I seem to be getting link errors in I386 code. How can I disable building for the 386 architecture?
Set Build Settings -> Architectures -> Supported Platforms to "iphoneos" for the project (the default is "iOS", which includes both real hardware and the simulator).
You might have to limit the supported architectures too to match those shipped from the 3rd party.
I had encountered this problem when I was using a library that was not written to support running on a simulator, It resulted in a lot of link errors stating that symbols were not recognized for i386 architecture. I discovered that if I selected an attached ios device instead of the simulator, the linker errors went away.
I would like to use Xcode under Mac OS X to compile and run a program written in a language that is not supported, e.g. Fortran. Assuming I have a compiler installed, e.g. gfortran or ifort, what are the steps in the Xcode project settings to make it possible to compile and run the program?
I have created an new, empty project since Fortran is not supported (only C,C++,Objective-C and Swift are selectable in a command line tool application). I created a simple Fortran file. But now I guess I have to add several things to the Builds tab in the project settings to make it compile and run (it works from the command line). What are these steps?
Add an external build system target to your project. External build system targets/projects let you build projects in languages Xcode doesn't natively support. The external build system target/project is in the Other section under OS X on the left side of the assistant. When you click the Next button, you'll be asked for the location of the build tool. Enter the path to your Fortran compiler. When you build the project, Xcode will use the Fortran compiler to do the building.
I have a native dll that I'd like to use in a WP8 project that I'm working on. I've done some research and have created a C++ Windows Runtime Component (WRC) to wrap the native DLL. The WRC project uses a .lib file, and my WP8 application calls the WRC project.
My solution compiles all fine, but when my application makes a call to a method in the native DLL, I get a The specified module could not be found. (Exception from HRESULT: 0x8007007E) exception.
From reading around it seems like the dll is not being loaded. I've copied all relevant dlls to the output dir of where the .exe file is and also in various places but the error keeps showing up.
If anyone could point me in the right direction I'd be very grateful. Also if more info is required I'll post that up also.
The DLL must be included in your XAP package. Something you can see being taken care of in the Output window when you build your app, it starts with the "Begin Xap packaging" messages and then lists all the files that get added. The runtime error says it is not being included.
There is remarkably little guidance on how to ensure that a file gets included in a phone package when MSBuild cannot figure out the dependencies by itself. It certainly won't for your DLL, no way the build system can tell if it isn't a project in your solution. Seems you're operating a bit on the bleeding edge in this case :)
But this works well when I try it, going by the MSBuild output and not by actually testing it: Project + Add Existing Item. Navigate to your DLL and select it. Select it in the Solution Explorer window and look in the Properties window. Ensure that "Build Action" = Content, Copy to Output Directory = "Copy if newer". Rebuild, you'll now see the file getting added to the XAP. Which should solve this particular error. There might be others :)
Windows Desktop or Windows Store native DLLs are not binary compatible with Windows Phone, even if they are built for the same CPU architecture.
Therefore you will need to recompile your native DLL for the Windows Phone toolset.
About Windows Runtime Components:
On Windows Phone a Windows Runtime Component is itself a native DLL (.NET is not supported on the phone). The binaries of Windows Runtime Components cannot be shared between Windows Store apps and Windows Phone apps.
I would like to compile a program written in C using Clang for 'Windows Phone' ARM target.
Does anyone have experience with it?
What is a better approach?
1) Building on a host running Windows 8 using Clang for Windows and MinGW. Does Clang for Windows / MinGW supports ARM by default? If not, I will need to re-build Clang and MinGW?
2) Building on a Linux/MAC host (where ARM target comes as default) and using Windows Phone toolchain (where can I get it?).
Thanks in advance!
There is no "Windows Phone ARM target" support in clang. Even if you'd succeed to compile something, I doubt you will be able to link & execute the binaries.
I get the following error when I try to build my first GPU Program. Any suggestions what might be going wrong?
Error 1 error MSB4062: The "Nvda.Build.CudaTasks.SanitizePaths" task
could not be loaded from the assembly C:\Program
Files\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\Nvda.Build.CudaTasks.dll.
Could not load file or assembly 'file:///C:\Program
Files\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\Nvda.Build.CudaTasks.dll'
or one of its dependencies. The system cannot find the file specified.
Confirm that the declaration is correct, that the assembly
and all its dependencies are available, and that the task contains a
public class that implements
Microsoft.Build.Framework.ITask. C:\Program
Files\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA
3.2.targets 70 4 gpu
I have faced with this problem. So many searching on internet but I could not find anything. At last I recognize that I closed Microsoft .NET Framework 3.5.1 features on Windows Features section in Control Panel.
to turn on Microsoft .Net Framework 3.5.1, you can easily follow these instructions;
http://www.sevenforums.com/tutorials/5023-windows-features-turn-off.html.
I hope this solution will help you !
I've come across this problem after upgrading my system to windows 10. It turns out that I have to reinstall Visual Studio because some dependent dlls have been moved to Windows.old folder.
I had this same error when I was compiling on a remote server. I think it was because I was logged in using Remote Desktop (RDP). When I logged in using VNC and compiled, the error no longer happened.
Note that it's impossible to even install the CUDA Toolkit via RDP, so this is unlikely to happen, unless you regularly use both methods to connect to a server.